Fixes #795: Login error message being displayed unnecessarily