Revert "Revert "Merge pull request #113 from jonasdt/cookies_file""

This reverts commit 16b9e72ea469446b13d01a40e0178e204395f375.
Reset global variables

Before we download a class, we reset the global variables. Otherwise
when you download multiple classes, we always use the authentication
cookies belonging to the first class.
Merge pull request #115 from jonasdt/fix_reverted_pull_request

Fix authentication with cookies files when downloading multiple courses
with a single invocation of the script.