Add tests and a fix for the rest_cherrypy logout view