public static IPromise <IAsyncConnection> ArasLogin(this ConnectionData credentials, bool async)
        {
            var cred  = credentials.ArasCredentials();
            var prefs = new ConnectionPreferences();

            prefs.Headers.UserAgent = "InnovatorAdmin v" + Assembly.GetExecutingAssembly().GetName().Version.ToString();
            var localePref = credentials.Params.FirstOrDefault(p => p.Name == "LOCALE");
            var tzPref     = credentials.Params.FirstOrDefault(p => p.Name == "TIMEZONE_NAME");

            if (localePref != null)
            {
                prefs.Headers.Locale = localePref.Value;
            }
            if (tzPref != null)
            {
                prefs.Headers.TimeZone = tzPref.Value;
            }

            return(Factory.GetConnection(credentials.Url
                                         , prefs, async)
                   .Continue(c =>
            {
                return c.Login(cred, async)
                .Convert(u => (IAsyncConnection)c);
            }));
        }