Modified curl to follow redirects