private async Task DoLogin() { var loginResult = await _edsWebApiService.LoginAsync(Email, SecurePassword); if (loginResult != null) { IsLoggedIn = true; IsNotLoggedIn = false; _appSettingsService.GetSettings().Email = Email; } else { IsNotLoggedIn = true; } if ((loginResult != null) && StorePassword) { _appSettingsService.GetSettings().ProtectedPassword = PasswordEncryptionService.Protect(SecurePassword); } else { _appSettingsService.GetSettings().ProtectedPassword = string.Empty; } _appSettingsService.SaveSettings(); }