Now following redirects, and logging appropriately. TODO: Remove debug puts