diff --git a/INSTALL.txt b/INSTALL.txt
index 04e7920..f36dd90 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -21,3 +21,8 @@ wiil be performed.  You may need to increase the allowed PHP memory if enabling
 via drush for very large numbers of users.
 
 Please test everything on your development copy of the site first!
+
+A core patch is also included with the module as user_load.D6.patch
+This patch is not needed for typical sites, but may be required for
+certain contrib modules that perform user registration with an external
+service or manipulate the user registration flow.
diff --git a/phpass.module b/phpass.module
index b0dc29f..335d215 100644
--- a/phpass.module
+++ b/phpass.module
@@ -33,6 +33,10 @@ function phpass_form_alter(&$form, $form_state, $form_id) {
       $form['#validate'][$key] = 'phpass_user_login_authenticate_validate';
     }
   }
+  // Add to the core submit function if the core patch is not applied.
+  if (!defined('USER_LOAD_PHPASS_PATCHED') && !empty($form['#submit']) && in_array('user_register_submit', $form['#submit'])) {
+    $form['#submit'][] = 'phpass_user_register_submit';
+  }
 }
 
 /**
@@ -55,6 +59,25 @@ function phpass_user_login_authenticate_validate($form, &$form_state) {
 }
 
 /**
+ * Extra submit to follow user_register_submit().
+ */
+function phpass_user_register_submit($form, &$form_state) {
+  global $user;
+
+  $account = isset($form_state['user']) ? $form_state['user'] : NULL;
+  if (!$account || user_access('administer users') || variable_get('user_email_verification', TRUE) || !$account->status) {
+    return;
+  }
+  // Test if the authentication failed (core patch not applied). This
+  // only happens when email verification is not required for registration.
+  if ($user->uid == 0 && !form_get_errors()) {
+    $user = $account;
+    user_authenticate_finalize($form_state['values']);
+    drupal_set_message(t('Registration successful. You are now logged in.'));
+  }
+}
+
+/**
  * Replacement for user_authenticate().
  */
 function phpass_user_authenticate($form_values = array()) {
diff --git a/user_load.D6.patch b/user_load.D6.patch
new file mode 100644
index 0000000..38fc910
--- /dev/null
+++ b/user_load.D6.patch
@@ -0,0 +1,44 @@
+diff --git a/modules/user/user.module b/modules/user/user.module
+index 625a00c..88ffbdb 100644
+--- a/modules/user/user.module
++++ b/modules/user/user.module
+@@ -7,6 +7,8 @@
+ 
+ define('USERNAME_MAX_LENGTH', 60);
+ define('EMAIL_MAX_LENGTH', 64);
++// Extra define to indicate user_load() is patched.
++define('USER_LOAD_PHPASS_PATCHED', 1);
+ 
+ /**
+  * Invokes hook_user() in every module.
+@@ -162,14 +164,14 @@ function user_load($user_info = array()) {
+     return FALSE;
+   }
+ 
++  $password_check_needed = FALSE;
+   foreach ($user_info as $key => $value) {
+     if ($key == 'uid' || $key == 'status') {
+       $query[] = "$key = %d";
+       $params[] = $value;
+     }
+     else if ($key == 'pass') {
+-      $query[] = "pass = '%s'";
+-      $params[] = md5($value);
++      $password_check_needed = TRUE;
+     }
+     else {
+       $query[]= "LOWER($key) = LOWER('%s')";
+@@ -181,6 +183,13 @@ function user_load($user_info = array()) {
+   if ($user = db_fetch_object($result)) {
+     $user = drupal_unpack($user);
+ 
++    if ($password_check_needed) {
++      module_load_include('inc', 'phpass', 'password');
++      if (!user_check_password($user_info['pass'], $user)) {
++        return FALSE;
++      }
++    }
++
+     $user->roles = array();
+     if ($user->uid) {
+       $user->roles[DRUPAL_AUTHENTICATED_RID] = 'authenticated user';
