backported prod cookie bug fix to master
not sure what changed, merged in prod changes
Revert "not sure what changed, merged in prod changes"

This reverts commit d1955141c33a717a226b4b5ee7b83cec3b735f09.
this time I think I merged the prod bug fix correctly