//- vim:ts=4:sw=4:
doctype html
html
	head
		include head
		title Login
		+altcha_script()
	body
		include header
		article
			h1 Login
			if flash
				p.error= flash

			if redirect
				p You need to be logged in to view this page!
				p Log in below, or <a href="/signup">sign up</a> for a free account.

			if user
				p You're already logged in!
			else
				form(method="post" action="/login")
					input(type="hidden" name="redirect" value=redirect)
					p
						label Name or mail:
							br
							input(type="text" name="username" required)
					p
						label Password:
							br
							input(type="password" name="password" required)
					+altcha_widget()
					p
						button(type="submit") Login
				p
					a(href="/forgot-password") Forgot password