Gets a session.
The client
Boolean determining whether a new session should be created if the session is invalid.
Returns the session.
See Implementation
Gets a session.