How do I redirect users to a predetermined url after login? I have a view in Drupal 7 that lists PDF files. I want to keep track of the users that open that file; so I want that, if they are not logged in when they click, they are sent to the login/sign up page. I have already accomplished this using two views with different permissions, but the problem is that, after they sign up, they are redirected to the user profile page, as opposed to the PDF file. 

How can I accomplish this?
All forms in Drupal support a internal destination parameter.

When you link to the user or user/register form, you can add ?destination=[url]

user/register?destination=node/1


Since you display the files-list with Views, you will need to re-write the files link to include the destination parameter.
If you output the link with l(), you can add the extra url data in l's third parameter like

l('Sign in to View', 'user', 'destination=node/1');