Fix check if the user entered correct password.
Reduce database calls for the credentials checking
Clear the password fields if success