CMS-4397 Implement basic session handling.