public ActionResult Register([Bind(Include = "firstName,lastName,Username,Password")] Member member) { if (ModelState.IsValid) { db.Members.Add(member); db.SaveChanges(); member = MemberFactory.GetLoggedInMember(member.Username); Session["Currentuser"] = member; Session["UserName"] = member.firstName; return(RedirectToAction("../Home/Index")); } return(View(member)); }