Index: django/contrib/auth/views.py
===================================================================
--- django/contrib/auth/views.py	(revision 11368)
+++ django/contrib/auth/views.py	(working copy)
@@ -14,7 +14,7 @@
 from django.contrib.auth.models import User
 from django.views.decorators.cache import never_cache
 
-def login(request, template_name='registration/login.html', redirect_field_name=REDIRECT_FIELD_NAME):
+def login(request, template_name='registration/login.html', redirect_field_name=REDIRECT_FIELD_NAME, extra_context=None):
     "Displays the login form and handles the login action."
     redirect_to = request.REQUEST.get(redirect_field_name, '')
     if request.method == "POST":
@@ -35,15 +35,19 @@
         current_site = Site.objects.get_current()
     else:
         current_site = RequestSite(request)
-    return render_to_response(template_name, {
+        
+    context = {
         'form': form,
         redirect_field_name: redirect_to,
         'site': current_site,
         'site_name': current_site.name,
-    }, context_instance=RequestContext(request))
+    }
+    context.update(extra_context or {})
+    return render_to_response(template_name, context, context_instance=RequestContext(request))
 login = never_cache(login)
 
-def logout(request, next_page=None, template_name='registration/logged_out.html', redirect_field_name=REDIRECT_FIELD_NAME):
+def logout(request, next_page=None, template_name='registration/logged_out.html', redirect_field_name=REDIRECT_FIELD_NAME,
+        extra_context=None):
     "Logs out the user and displays 'You are logged out' message."
     from django.contrib.auth import logout
     logout(request)
@@ -52,9 +56,9 @@
         if redirect_to:
             return HttpResponseRedirect(redirect_to)
         else:
-            return render_to_response(template_name, {
-                'title': _('Logged out')
-            }, context_instance=RequestContext(request))
+            context = {'title': _('Logged out')}
+            context.update(extra_context or {})
+            return render_to_response(template_name, context, context_instance=RequestContext(request))
     else:
         # Redirect to this page until the session has been cleared.
         return HttpResponseRedirect(next_page or request.path)
@@ -81,7 +85,7 @@
 def password_reset(request, is_admin_site=False, template_name='registration/password_reset_form.html',
         email_template_name='registration/password_reset_email.html',
         password_reset_form=PasswordResetForm, token_generator=default_token_generator,
-        post_reset_redirect=None):
+        post_reset_redirect=None, extra_context=None):
     if post_reset_redirect is None:
         post_reset_redirect = reverse('django.contrib.auth.views.password_reset_done')
     if request.method == "POST":
@@ -100,16 +104,17 @@
             return HttpResponseRedirect(post_reset_redirect)
     else:
         form = password_reset_form()
-    return render_to_response(template_name, {
-        'form': form,
-    }, context_instance=RequestContext(request))
+    context = { 'form': form }
+    context.update(extra_context or {})
+    return render_to_response(template_name, context, context_instance=RequestContext(request))
 
-def password_reset_done(request, template_name='registration/password_reset_done.html'):
-    return render_to_response(template_name, context_instance=RequestContext(request))
+def password_reset_done(request, template_name='registration/password_reset_done.html', extra_context=None):
+    context = extra_context or {}
+    return render_to_response(template_name, context, context_instance=RequestContext(request))
 
 def password_reset_confirm(request, uidb36=None, token=None, template_name='registration/password_reset_confirm.html',
                            token_generator=default_token_generator, set_password_form=SetPasswordForm,
-                           post_reset_redirect=None):
+                           post_reset_redirect=None, extra_context=None):
     """
     View that checks the hash in a password reset link and presents a
     form for entering a new password.
@@ -137,15 +142,17 @@
     else:
         context_instance['validlink'] = False
         form = None
-    context_instance['form'] = form    
-    return render_to_response(template_name, context_instance=context_instance)
+    context_instance['form'] = form
+    context = extra_context or {}
+    return render_to_response(template_name, context, context_instance=context_instance)
 
-def password_reset_complete(request, template_name='registration/password_reset_complete.html'):
-    return render_to_response(template_name, context_instance=RequestContext(request,
-                                                                             {'login_url': settings.LOGIN_URL}))
+def password_reset_complete(request, template_name='registration/password_reset_complete.html', extra_context=None):
+    context = extra_context or {}
+    return render_to_response(template_name, context,
+        context_instance=RequestContext(request, {'login_url': settings.LOGIN_URL}))
 
 def password_change(request, template_name='registration/password_change_form.html',
-                    post_change_redirect=None):
+                    post_change_redirect=None, extra_context=None):
     if post_change_redirect is None:
         post_change_redirect = reverse('django.contrib.auth.views.password_change_done')
     if request.method == "POST":
@@ -155,10 +162,11 @@
             return HttpResponseRedirect(post_change_redirect)
     else:
         form = PasswordChangeForm(request.user)
-    return render_to_response(template_name, {
-        'form': form,
-    }, context_instance=RequestContext(request))
+    context = { 'form': form }
+    context.update(extra_context or {})
+    return render_to_response(template_name, context, context_instance=RequestContext(request))
 password_change = login_required(password_change)
 
-def password_change_done(request, template_name='registration/password_change_done.html'):
-    return render_to_response(template_name, context_instance=RequestContext(request))
+def password_change_done(request, template_name='registration/password_change_done.html', extra_context=None):
+    context = extra_context or {}
+    return render_to_response(template_name, context, context_instance=RequestContext(request))
