Fix crash on login with invalid usernamd/password