title: Hide a button in Spring Boot/Thymeleaf application if not logged in
body: <p>I'm trying to hide a button in the header of my Spring Boot application in the following way with my markup:</p>
  
  <pre><code>&lt;!-- Is not logged in, so don't show "Log In" --&gt;
  &lt;li sec:authorize="!isAuthenticated()"&gt;
      &lt;a href="/login" th:href="@{/login}" class="btn-login"&gt;Log In&lt;/a&gt;
  &lt;/li&gt;\
  </code></pre>
  
  <p>Is this not correct? I'm using the Thymeleaf templating engine. </p>