{{template "header" .}}

{{template "footer" .}}

<script>
    $(function(){
        var alert = $('#common-alert');
        $.ajax({
            url:"/user/logout",
            type: 'POST',
            dataType: 'json',
            success: function(result) {
                location.replace("/");
            },
            error: function (result) {
                alert.addClass('alert-danger');
                alert.show();
                alert.children('p').html(result.responseText);
            }
        })
    })
</script>