   {% if user.is_authenticated %}
   
   {% else %}
    <div class="valign-wrapper" style="width:100%;height:100%;position: absolute;">
      <div class="valign" style="width:100%;">
        <div class="container">
          <div class="row">
            <div class="col s12 m6 offset-m3">
              <div class="card">
                <div class="card-content center">
                  <p>You don't have permission to view this.</p> 
                </div>
                <div class="card-action center">
                  <a class="waves-effect waves-light btn-large green accent-4" href="{% url 'login'%}?next={{request.path}}">Login</a>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
   {% endif %} 