improved session management