Fix cookie setting

I really messed things up with the last few commits, didn't I?