formatted user into a single object, and added a method to retrieve the delegation token