Add cookie handling to RESTRequest, add session logout method to client