public ActionResult Index(string login, string password) { var account = service.Authorize(login, password); if (account != null) { Session.Add("accountId", account.Id); return(Redirect("/Task/Tasks")); } return(View()); }