changed session to get id of user object (api change)