With Wes's help, got cookies working properly