private LogInResult BuildResult(LogInViewModel login) { var principal = this.CreatePrincipalFor(login); var authorizationTicket = SignInHelper.CreateAuthenticationTicketFor(principal, login.RememberMe); SignInHelper.SetAuthorizationCookie(authorizationTicket); var result = new LogInResult() { Success = true, FirstName = principal.FirstName, LastName = principal.LastName, CompanyName = principal.CompanyName }; result.TargetUrl = FormsAuthentication.GetRedirectUrl(login.Name, true); return(result); }