We use the session object to be able to keep track of which user, if any, is logged in and then modify the application layout to include the "right" link based on that information.
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.