{% embed 'partials/login.html.twig' with {title:'Grav Admin Login'} %}

    {% block form %}
        {% for field in page.header.form.fields %}
            {% if field.type %}
                <div>
                    {% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
                </div>
            {% endif %}
        {% endfor %}

        <div class="form-actions secondary-accent">
            {% if notAuthorized %}
                <a class="button secondary" onclick="window.history.back()"><i class="fa fa-reply"></i> {{ 'PLUGIN_ADMIN.BACK'|tu }}</a>
            {% else %}
                {% if not authenticated %}
                    <a class="button secondary" href="{{ base_url_relative }}/forgot"><i class="fa fa-exclamation-circle"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN_FORGOT'|tu }}</a>
                    <button type="submit" class="button primary" name="task" value="login"><i class="fa fa-sign-in"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN'|tu }}</button>
                {% else %}
                    <button type="submit" class="button primary" name="task" value="logout"><i class="fa fa-sign-in"></i> {{ 'PLUGIN_ADMIN.LOGOUT'|tu }}</button>
                {% endif %}
            {% endif %}
        </div>

    {% endblock %}

{% endembed %}

{% embed 'partials/login.html.twig' with {title:'Grav Admin Login'} %}

    {% block form %}
        {% for field in page.header.form.fields %}
            {% if field.type %}
                <div>
                    {% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
                </div>
            {% endif %}
        {% endfor %}

        <div class="form-actions secondary-accent">
            {% if notAuthorized %}
                <a class="button secondary" onclick="window.history.back()"><i class="fa fa-reply"></i> {{ 'PLUGIN_ADMIN.BACK'|tu }}</a>
                <button type="submit" class="button primary" name="task" value="logout"><i class="fa fa-sign-in"></i> {{ 'PLUGIN_ADMIN.LOGOUT'|tu }}</button>
            {% else %}
                {% if not authenticated %}
                    <a class="button secondary" href="{{ base_url_relative }}/forgot"><i class="fa fa-exclamation-circle"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN_FORGOT'|tu }}</a>
                    <button type="submit" class="button primary" name="task" value="login"><i class="fa fa-sign-in"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN'|tu }}</button>
                {% else %}
                    <button type="submit" class="button primary" name="task" value="logout"><i class="fa fa-sign-in"></i> {{ 'PLUGIN_ADMIN.LOGOUT'|tu }}</button>
                {% endif %}
            {% endif %}
        </div>

    {% endblock %}

{% endembed %}

Add a logout button when not authorized to access a page in Admin
:sparkles: Add a logout button when not authorized to access a page in Admin

Otherwise if the user cannot access any page it needs to clear the
cache to be able to logout and login again
