Added more debugging, and maybe fixed the fact that the cookie domain was not being re-saved