Action when a user tries to log in.