Use the cookie

This was a horrible bug that myself and @tomwans found yesterday while deploying. There were a few mistakes, such as rendering the wrong file (ugh), and not doing the correct commands to change the cookie on a live node, but what we have here works (I tested it after all).