+ # return to the caller if any
+ session = UserSession()
+ ref = session.get_data('login', 'Return')
+
+ # otherwise destroy session and return error
+ if not ref:
+ ref = cherrypy.config.get('base.mount', "") + '/unauthorized'
+ # Just make sure we destroy the session
+ session.logout(None)
+