async public Task <IUserProfile> GetUserProfile(MobileServiceAuthenticationProvider provider)
        {
            switch (provider)
            {
            case MobileServiceAuthenticationProvider.Google:
                try
                {
                    //Can't get profile w/out a token
                    if (Settings.AccessToken == null)
                    {
                        return(null);
                    }

                    using (var client = new HttpClient())
                    {
                        const string url = "https://www.googleapis.com/oauth2/v1/userinfo?alt=json";
                        client.DefaultRequestHeaders.Add("Authorization", Settings.AccessTokenAndType);
                        var json = await client.GetStringAsync(url);

                        var profile = JsonConvert.DeserializeObject <GoogleUserProfile>(json);
                        return(profile);
                    }
                }
                catch (Exception e)
                {
                    Debug.WriteLine(e);
                    return(null);
                }

            case MobileServiceAuthenticationProvider.WindowsAzureActiveDirectory:

                if (_identity == null)
                {
                    return(null);
                }

                var ad = new ActiveDirectoryUserProfile();
                ad.Id    = _identity.UserClaims.SingleOrDefault(c => c.Typ == "http://schemas.microsoft.com/identity/claims/objectidentifier")?.Val;
                ad.Email = _identity.UserClaims.SingleOrDefault(c => c.Typ == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress")?.Val;
                ad.Name  = _identity.UserClaims.SingleOrDefault(c => c.Typ == "name")?.Val;

                //using(var client = new HttpClient())
                //{
                //	client.DefaultRequestHeaders.Add("ZUMO-API-VERSION", "2.0.0");
                //	client.DefaultRequestHeaders.Add("Authorization", "Bearer " + AzureService.Instance.Client.CurrentUser.MobileServiceAuthenticationToken);
                //	client.DefaultRequestHeaders.Add("X-ZUMO-AUTH", AzureService.Instance.Client.CurrentUser.MobileServiceAuthenticationToken);
                //	var json = client.GetStringAsync("https://graph.microsoft.com/v1.0/me/").Result;
                //	Debug.WriteLine(json);
                //	//identity = JsonConvert.DeserializeObject<JToken>(json);
                //}

                return(ad);

            default:
                return(null);
            }
        }
		async public Task<IUserProfile> GetUserProfile(MobileServiceAuthenticationProvider provider)
		{
			switch(provider)
			{
				case MobileServiceAuthenticationProvider.Google:
					try
					{
						//Can't get profile w/out a token
						if(Settings.AccessToken == null)
							return null;

						using(var client = new HttpClient())
						{
							const string url = "https://www.googleapis.com/oauth2/v1/userinfo?alt=json";
							client.DefaultRequestHeaders.Add("Authorization", Settings.AccessTokenAndType);
							var json = await client.GetStringAsync(url);
							var profile = JsonConvert.DeserializeObject<GoogleUserProfile>(json);
							return profile;
						}
					}
					catch(Exception e)
					{
						Debug.WriteLine(e);
						return null;
					}

				case MobileServiceAuthenticationProvider.WindowsAzureActiveDirectory:

					if(_identity == null)
						return null;

					var ad = new ActiveDirectoryUserProfile();
					ad.Id = _identity.UserClaims.SingleOrDefault(c => c.Typ == "http://schemas.microsoft.com/identity/claims/objectidentifier")?.Val;
					ad.Email = _identity.UserClaims.SingleOrDefault(c => c.Typ == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress")?.Val;
					ad.Name = _identity.UserClaims.SingleOrDefault(c => c.Typ == "name")?.Val;

					//using(var client = new HttpClient())
					//{
					//	client.DefaultRequestHeaders.Add("ZUMO-API-VERSION", "2.0.0");
					//	client.DefaultRequestHeaders.Add("Authorization", "Bearer " + AzureService.Instance.Client.CurrentUser.MobileServiceAuthenticationToken);
					//	client.DefaultRequestHeaders.Add("X-ZUMO-AUTH", AzureService.Instance.Client.CurrentUser.MobileServiceAuthenticationToken);
					//	var json = client.GetStringAsync("https://graph.microsoft.com/v1.0/me/").Result;
					//	Debug.WriteLine(json);
					//	//identity = JsonConvert.DeserializeObject<JToken>(json);
					//}

					return ad;

				default:
					return null;
			}
		}