Updated setCookie to use SERVER_NAME instead of HTTP_HOST