Cookie timing fix

Fixed some formatting, and changed cookie timing.