Optimization code in session management

Implement static method OnInvalidSession with static properties of
authenticate class