if you track the login page, you could try to add a parameter on the redirect, something like ?redirect=source
then on the login page you would know that the user has been redirected by trying to get to the download and track this information somewhere...