Add a close() method to sessions.