correctly check if username or passwor is empty