private ApplicationUser getLoggedUser() { if (User.Identity.IsAuthenticated) { var user = _userRepo.FindSingleBy(dbUser => dbUser.Email == User.Identity.Name); return(user); } return(null); }