Refactoring of login functionality

* Redirect the wb to the start page on logout
* Set the role attribute when it changes so that we can see the role visualized
  in the tooltip even on first login
* Clean up some of the code and remove unneeded junk