completed userinfo handling, refactored token handling