Improved session management - client side