Cookies not getting set

I figured this out. Was trying to access something before it was set.