Implement longest session tracking