Fix bug that error message is not displaying when login failed.