Attempting to fix user session management