public IActionResult Home() { if (HttpContext.Session.GetString("loggedIn") == "true") { ViewBag.loggedIn = true; ViewBag.userID = HttpContext.Session.GetInt32("userID"); ViewBag.AllActivities = ActivityFactory.GetActivities(); ViewBag.JoinedActivities = ActivityFactory.MyActivities((int)HttpContext.Session.GetInt32("userID")); ViewBag.errors = ""; return(View()); } return(RedirectToAction("Index", "Home")); }