Fixed an issue if the login failed.