<p>
  <a href="{% url 'blogs:index' %}">Blog Host</a> -
  <a href="{% url 'blogs:blogs' %}">All blogs</a> - 
  {% if user.is_authenticated %}
    Hello, {{ user.username }}.
  {% else %}
    <a href="{% url 'accounts:register' %}">Register</a> -
    <a href="{% url 'accounts:login' %}">Log in</a>
  {% endif %}
</p>

{% block content %}{% endblock content %}

{% if user.is_authenticated %}
<hr />
  <form action="{% url 'accounts:logout' %}" method='post'>
    {% csrf_token %}
    <button name='submit'>Log out</button>
  </form>
{% endif %}