title: How to check if user is authenticated in Razor pages of .Net Core 2.0
body: <p>I would like to check if a user is logged in in an ASP.NET Core 2.0 application in a Razor page. The following code worked in .NET 4.6.1:</p>
  
  <pre><code>@if (!Request.IsAuthenticated)
  {
      &lt;p&gt;&lt;a href="@Url.Action("Login", "Account")" class="btn btn1-success btn-lg" role="button" area=""&gt;Sign In &amp;raquo;&lt;/a&gt;&lt;/p&gt;
  }
  </code></pre>
  
  <p>How can I do this in Core 2.0?</p>