public void Login(AuthenticationModel model, bool isPersistent)
 {
     var authTicket = new FormsAuthenticationTicket(
                                                     1,
                                                     model.Name,
                                                     DateTime.Now,
                                                     DateTime.Now.AddMinutes(FormsAuthentication.Timeout.TotalMinutes),
                                                     isPersistent,
                                                     SerializationHelper.Serialize(model)
                                                    );
     HttpContext.Current.Response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt(authTicket)));
 }
 public DashboardController(IAuthenticationService authenticationService)
 {
     _authenticationService = authenticationService;
     authData = _authenticationService.GetAuthData();
 }