Index: django/contrib/auth/__init__.py
===================================================================
--- django/contrib/auth/__init__.py	(revision 15679)
+++ django/contrib/auth/__init__.py	(working copy)
@@ -53,6 +53,10 @@
     for backend in get_backends():
         try:
             user = backend.authenticate(**credentials)
+            if hasattr(backend,'supports_inactive_user'):
+            	user.active_required = not backend.supports_inactive_user
+            else:
+                user.active_required = True
         except TypeError:
             # This backend doesn't accept these credentials as arguments. Try the next one.
             continue
Index: django/contrib/auth/forms.py
===================================================================
--- django/contrib/auth/forms.py	(revision 15679)
+++ django/contrib/auth/forms.py	(working copy)
@@ -85,7 +85,7 @@
             self.user_cache = authenticate(username=username, password=password)
             if self.user_cache is None:
                 raise forms.ValidationError(_("Please enter a correct username and password. Note that both fields are case-sensitive."))
-            elif not self.user_cache.is_active:
+            elif not self.user_cache.is_active and self.user_cache.active_required:
                 raise forms.ValidationError(_("This account is inactive."))
         self.check_for_test_cookie()
         return self.cleaned_data
