Check if Visitor show logon button I am trying to figure out how to check if a visitor is not logged in so that I can show the correct button. E.g

{% if craft.session.isLoggedIn %}
    &lt;a href="{{ logoutUrl }}"&gt;Logout&lt;/a&gt;
{% else %}
    {% craft.session.isGuest %}
    &lt;a href="{{ logoutUrl }}"&gt;Client/a&gt;
{% endif %}


What is the best method to display a "sign in" button for a visitor that takes them to a login page and then once logged in, show "Logout"?
I believe you'll want something like this...

{% if currentUser %}
    &lt;a href="{{ url('logout') }}"&gt;Logout&lt;/a&gt;
{% else %}
    &lt;a href="{{ url('login') }}"&gt;Login&lt;/a&gt;
{% endif %}