You seem to expect that this action Indexis called when you do: @Html.Partial('_LoginPartial'). It will never happen. Partialjust does partial browsing through Razor with the current view context and spills out the generated HTML.
If you need additional information for partial, you can specify a custom ViewDataDictionary:
@Html.Partial("_LoginPartial", new ViewDataDictionary { Foo = "Bar" });
What you can then get through partial through:
ViewData["Foo"]
, , , . _LoginPartial , , . , , _LoginPartial, MVC auth, .
, , , , , , Html.Action Html.Partial:
@Html.Action("Index")
, .