Improved session management.