Added some session timeout functionality.