Fixes #795: Login error message being displayed unnecessarily

I believe this fixes #795, which is being caused by current_user not being set. I could reproduce in a browser and now with this fix I can't any more.

I'll add test coverage at some point, but I'm too tired right now and I figured a fix is better than nothing!