Rewriting incoming JS on login is working. Still missing a cookie somewhere.