{% load url from future %}
<form action="{% url 'untappd:redirect' %}" method="post">
    {% csrf_token %}
    {% if next %}
        <input type="hidden" name="next" value="{{ next }}" />
    {% endif %}
    {% if button %}
    	<input type="image" onclick="this.form.submit();" src="{{ button }}" />
    {% else %}
    	<input type="submit" value="Sign in with Untappd" />
    {% endif %}
</form>
