How do I control the session of the connection?