You declare the
LookupUser
method as
private static DataTable LookupUser(string Username)
but you are using it as
DataTable dt = LookupUser(pwd)
In other words, the method is expecting a user name as a parameter but you are passing the encrypted password.