added error checking for empty username/password