{% extends "layout.html" %}
{% block toptext %}
This page is used internally
{% endblock %}
{% block main %}
<script type="text/javascript" src="https://login.persona.org/authentication_api.js"></script>
<script type="text/javascript">
    var loggedin = {{ loggedin|lower }};

    if(loggedin)
    {
        navigator.id.beginAuthentication(function(email) {
            navigator.id.completeAuthentication();
        });
    } else {
        navigator.id.raiseAuthenticationFailure('User cancelled signon');
    }
</script>
{% endblock %}
