Refactored UserDetails stuff to be more easily extensible, fixed SSO and
user roles