Exposing Close(endSession) method for the connection.