Moved session management into usersession.py