Added session timeout functionality.