Fixed an error where the usersession would be updated twice