public ActionResult Index() { if (Request.IsAuthenticated == true) { string url = string.Format("https://www.metaweather.com/api/location/44544/"); var vm = new WeatherViewModel(); var weatherviewmodel = vm.GenerateViewModel(url); return(View(weatherviewmodel)); } else { return(RedirectToAction("Index", "Login")); } }