Session stuff

Implementing custom session extension logic.