Slight improvements regarding session lifetime