Well, that indicates that it couldn't find the cookie. I'd try logging out all cookies before the for loop just to see what you're actually getting back.
Another thing to try would be removing "200" from the list of good statuses. As far as I know, it should always be a 302. It's possible that if you're getting a 200 it's not setting the cookie.
One final note is that your external host shouldn't have "http://" in it. Just the host name. It takes a hash of the domain name, not a URL.