Globalize variables

In order to add further 3rd party providers properly, `$registerVia3rdParty` and `$avatarURL` should be globalized, so event listeners can overwrite them.