how to get cookie from response header javascript