Fix the internal server error

There was no bug filed for this issue, but this error happened after we deployed the latest version of the registry with the download data tracking feature.
The order of statements is important for passport, otherwise user couldn't authenticate with github and the server returned with a 500 internal server error.