Fixed bug with crashing on failed login.
Merge branch 'test' into dev