main functions to set/check session lifetime

Signed-off-by: lionel