public void get_access_token(HttpContext context)
        {
            String username = context.Request.Form["username"];
            String password = context.Request.Form["password"];

            OAuthController oauthController = new OAuthController();
            OAuthViewModel oauth = new OAuthViewModel();
            oauth.access_token = "";
            User user = new AuthenticationController().actionCheckLoginData(username, password);
            System.Diagnostics.Debug.WriteLine("User:"******"  ,type:" + user.user_type);
            if (user != null)
            {
                if ((user.user_type == 1) || (user.user_type == 2))
                {
                    oauth.access_token = oauthController.actionGetNewTokenByUsernameAndPassword(username, password);
                }
            }
            System.Diagnostics.Debug.WriteLine(JsonConvert.SerializeObject(oauth));
            context.Response.Write(JsonConvert.SerializeObject(oauth));
        }
        public void get_access_token(HttpContext context)
        {
            String username = context.Request.Form["username"];
            String password = context.Request.Form["password"];

            OAuthController oauthController = new OAuthController();
            OAuthViewModel oauth = new OAuthViewModel();
            oauth.access_token = "";
            User user = new AuthenticationController().actionCheckLoginData(username, password);
            if (user != null) {
                if (user.user_type == 5 || user.user_type == 6){
                    oauth.access_token = oauthController.actionGetNewTokenByUsernameAndPassword(username, password);
                }
            }

            context.Response.Write(JsonConvert.SerializeObject(oauth));
        }