Improved session tracking