convert session into a Session object so we can use it to modify the session data