public static async Task TryAuthenticate(string successUrl = null, string errorUrl = null)
 {
     Authenticating?.Invoke(true);
     if (await HSReplayNetOAuth.Authenticate(successUrl, errorUrl))
     {
         if (!await HSReplayNetOAuth.UpdateAccountData())
         {
             ErrorManager.AddError("HSReplay.net Error",
                                   "Could not load HSReplay.net account status."
                                   + " Please try again later.");
             AuthenticationError?.Invoke(AuthenticationErrorType.AccountData);
         }
         await SyncCollection();
     }
     else
     {
         ErrorManager.AddError("Could not authenticate with HSReplay.net",
                               "Please try running HDT as administrator "
                               + "(right-click the exe and select 'Run as administrator').\n"
                               + "If that does not help please try again later.", true);
         AuthenticationError?.Invoke(AuthenticationErrorType.Authentication);
     }
     Authenticating?.Invoke(false);
 }