Improve UI logout

Make the browser window scroll to top to ensure that logout menu is
visible.

Bonus: some formatting love
Merge pull request #1525 from elyezer/improve-ui-logout

Improve UI logout