Optimized session management for login