cookie check and set methods working