follow redirects correctly