public ActionResult LogOff()
 {
     AuthenticationManager.SignOut(DefaultAuthenticationTypes.ApplicationCookie);
     //Clear cache when logging out
     MessageWebService.ClearCache();
     return(RedirectToAction("Index", "App"));
 }
        public ActionResult Save(FormCollection collection)
        {
            if (TryUpdateModel(_model, new[] { "StartLocation" }, collection))
            {
                var user = UserManager.FindById(User.Identity.GetUserId());
                user.StartLocation = Convert.ToInt32(collection["countyDropDownList"]);
                var result = UserManager.Update(user);
                TempData["savedToXml"] = "Inställningen sparades";

                //Remove items from cache when a new default location is choosen
                MessageWebService.ClearCache();
            }
            else
            {
                TempData["savedToXml"] = "Fel!Försök igen.";
            }

            ////Saves new county to xml-file and saves a confirmaton message
            //_model.SelectedCounty = Convert.ToInt32(collection["countyDropDownList"]);
            //TempData["savedToXml"] = "Inställningen sparades";

            return(RedirectToAction("Index"));
        }