{%- if config.ACCOUNTS %}

    {%- if not current_user.is_authenticated %}

        {%- if config.SECURITY_REGISTERABLE %}
            <div class="short-menu-right-button">
                <a href="{{ url_for('security.register') }}" class="no-decoration">
                    {{ _ ("Sign up") }}
                </a>
            </div>
        {%- endif %}

        <div class="short-menu-right-button">
            <a href="{{ url_for_security('login', next=request.path) }}" class="no-decoration">
                {{ _ ("Log in") }}
            </a>
        </div>
    {%- else %}
        {%- if config.USERPROFILES %}
            <div class="short-menu-right-button">
                <a href="{{ url_for('invenio_userprofiles.profile') }}" class="no-decoration">
                    <i class="user icon"></i> {{ current_user.email }}
                </a>
            </div>
            <div class="short-menu-right-button">
                <a class="dropdown-item no-decoration" href="{{ url_for_security('logout') }}"
                    >Sign out</a
                >
            </div>
        {%- endif %}
    {%- endif %}
{%- endif %}
