fix security flaw for download actions

 - edited authorized_to_download action
 - changed redirect with render in download_zip action
Merge pull request #1141 from GhiGt/download_problems

Fix: security flaw for download action.