try to set the cookie correctly