Made some fixes to work in production mode.
Reimplemented cookie checking for joyride.