Added -L argument to curl request so that redirects will be followed.