Simple login script from a nub

The utility of a login script is self-evident. As I learned about Django's built-in user authentication features, I whipped up this script and figured that I'd post it here. I am by no means an expert and would appreciate any constructive criticism. However, per the rules of this site, this is working code and not work in progress.
Thanks
Also: I wrote a blog post explaining the script for those who are interested: http://bit.ly/bwIL

#models.pyclassLoginForm(forms.Form):username=forms.CharField(max_length=100)password=forms.CharField(widget=forms.PasswordInput(render_value=False),max_length=100)#views.pyfromdjango.contrib.authimportauthenticate,loginfromdjango.shortcutsimportrender_to_responsedeflogin(request):deferrorHandle(error):form=LoginForm()returnrender_to_response('login.html',{'error':error,'form':form,})ifrequest.method=='POST':# If the form has been submitted...form=LoginForm(request.POST)# A form bound to the POST dataifform.is_valid():# All validation rules passusername=request.POST['username']password=request.POST['password']user=authenticate(username=username,password=password)ifuserisnotNone:ifuser.is_active:# Redirect to a success page.login(request,user)returnrender_to_response('courses/logged_in.html',{'username':username,})else:# Return a 'disabled account' error messageerror=u'account disabled'returnerrorHandle(error)else:# Return an 'invalid login' error message.error=u'invalid login'returnerrorHandle(error)else:error=u'form is invalid'returnerrorHandle(error)else:form=LoginForm()# An unbound formreturnrender_to_response('login.html',{'form':form,})#login.html{%iferror%}<p>{{error}}</p>{%endif%}<formaction="."method="POST">{{form.as_p}}<inputtype="submit"value="Submit"/></form>#logged_in.html<h1>Welcome,{{username}}</h1>