{% extends "itsapp/base.html" %}

{% block content %}
	<h2>Login</h2>
	<div class="login">
		<p class="form-message">{{ msg }}</p>
		{% if state %}
			<script type="text/javascript">
			function delayer(){
				window.location = "{% url user_page user.id%}"
			}
			setTimeout('delayer()',1000);
			</script>
		{% else %}
			<form class="form" action="{% url login_user %}" method="post">
				{% csrf_token %}
				{{ form.as_p }}
				<input type="submit" value="Submit" />
			</form>
		{% endif %}
	</div>
{% endblock %}
