public void dropToken()
 {
     token = null;
     auth = false;
 }
 public bool authorize(String authCode)
 {
     // get the access token
     HttpClient http = new HttpClient(baseUri);
     HttpUrlEncodedForm req = new HttpUrlEncodedForm();
     req.Add("code", authCode);
     req.Add("client_secret", client_secret);
     req.Add("client_id", client_id);
     HttpResponseMessage resp = http.Post("access_token", req.CreateHttpContent());
     if (resp.StatusCode == System.Net.HttpStatusCode.OK)
     {
         token = resp.Content.ReadAsJsonDataContract<AccessToken>();
         auth = true;
         return true;
     }
     auth = false;
     return false;
 }