Fix issue 4756: /login should not crash if one goes there when logged in.
Add test.
Merge pull request #124 from jessib/feature/bugfix4756_login_crash

Feature/bugfix4756 login crash