public async Task <ActionResult> Start(LoginBindingModel model, string returnUrl) { if (!ModelState.IsValid) { return(RedirectToAction("Index", model)); } var uri = Request.IsLocal ? Constant.LOCAL_TOKEN_URI : Constant.REMOTE_TOKEN_URI; var token = await RequestHelpers.GetTokenAsync(model.Email, model.Password, uri); if (token != null) { return(Redirect(returnUrl)); } return(RedirectToAction("Index", model)); }