added logic to follow GET redirects