Implementation of seamless persistent mode.
This mean that the session can be persistent and
will not terminate when last spawned application is
closed. A persisten session will end if it's disonnected
during a timeout which matches the cookie liftime.