If your oauth token is invalid for any reason, Tracker forces you to reconnect your account to the OAuth provider (MediaWiki installation). However, Tracker will forget which page you were at previously, and redirects you to mainpage. That means you have to go wherever you were yourself again.
Change InvalidOauth middleware to pass next parameter with the URL Tracker should redirect to.
Student is expected to send a patch for wikimedia-cz/tracker repository, hosted at Wikimedia Gerrit. When claiming task on GCI website, student should claim a respective Phabricator task as well.