private void LoginDialog_AfterLogin(LoginDialog.AfterLoginEventArgs args)
 {
     using (new LogCall(Log, nameof(LoginDialog_AfterLogin), nameof(LoginDialog_AfterLogin)))
     {
         try
         {
             DataProvider dataProvider = new DataProvider(args.CookieContainer, args.Uri, ModelGlobal.Instance.DeploymentVersion);
             UserInfo     userInfo     = dataProvider.GetUserInfoCall(AddinTypes.Excel).Result;
             if (userInfo.Capabilities.Contains(Capabilities.ExcelAddin))
             {
                 ModelGlobal.Instance.ClientUri = args.Uri;
                 ModelGlobal.Instance.Cookies   = args.CookieContainer;
                 ModelGlobal.Instance.UserInfo  = userInfo;
                 DataProviderBase.Setinstance(dataProvider);
             }
             else
             {
                 args.Error = string.Format("No access to addins", AddinTypes.Excel);
             }
         }
         catch (Exception e)
         {
             Log.Error(e);
             args.Error = ErrorMessageUtil.Instance.GetErrorMessage(e).Message;
         }
     }
 }