Improve detection of expired sessions
Improve detection of expired sessions