Implement logout for console and http-endpoint.