Added logout and logged in user handling on /login
Move stuff around to make it work - Fixes #27