Session timeout and lifetime fixes.