'Logout. May raise redirect, or return True if request handled.'

def do_logout(self, from_page='..', **kwargs):

    sess = cherrypy.session
    username = sess.get(self.session_key)
    sess[self.session_key] = None
    if username:
        cherrypy.serving.request.login = None
        self.on_logout(username)
    raise cherrypy.HTTPRedirect(from_page)
