Setting cookie correctly.