fixed the cookie issue

fixed the :bug:  where cookies were pulled before they were set.