Rework hooks so they are now run before connecting to the backend when the user doesn't present a cookie
Convert the incoming url early as proxies change it to the destination