Improve cookie protocol a bit, I hope.

People have had trouble with cookies recently. Maybe this is
because we were setting "cookie=1" without setting the cookie?...
Unlikely.