/// <summary>
 /// Logs out of all mod repositories.
 /// </summary>
 private void Logout()
 {
     lock (ModRepository)
         if (ModRepository.IsOffline)
         {
             ModManager.Login();
         }
         else
         {
             ModRepository.Logout();
             ModManager.Logout();
             EnvironmentInfo.Settings.RepositoryAuthenticationTokens.Remove(ModRepository.Id);
             EnvironmentInfo.Settings.Save();
         }
 }