@using Microsoft.AspNetCore.Identity @{ if (User?.Identity?.IsAuthenticated == true) { Layout = "~/Pages/Shared/_Layout.cshtml"; } else { Layout = "~/Pages/Shared/_Sub.cshtml"; } }