Improve UI logout

Make the browser window scroll to top to ensure that logout menu is
visible.

Bonus: some formatting love