--- logintoboggan.module	2006-08-23 11:36:16.000000000 -0500
+++ logintoboggan.module.orig	2006-08-23 11:34:24.000000000 -0500
@@ -215,7 +215,7 @@
 
   if (array_intersect(array_keys($form_values), array('uid', 'roles', 'init', 'session', 'status'))) {
     watchdog('security', t('Detected malicious attempt to alter protected user fields.'), WATCHDOG_WARNING);
-    return 'user/register';
+    drupal_goto('user/register');
   }
 
   // Set the roles for the new user--it's the pre-auth role if they can pick their own password,
@@ -266,14 +266,14 @@
 
   //log the user in if they created the account and immediate login is enabled.
   if(variable_get('reg_passwd_set', 0)) {
-    return logintoboggan_process_login($account, $redirect);
+    logintoboggan_process_login($account, $redirect);
   }
 
   //redirect to the appropriate page.
   if ($redirect != '') {
-    return $redirect;
+    drupal_goto($redirect);
   } else {
-    return '';
+    drupal_goto();
   }
 }
 
@@ -299,7 +299,7 @@
       if (!$user->uid) {
         form_set_error('login', t('Sorry. Unrecognized username or password.') .' '. l(t('Have you forgotten your password?'), 'user/password'));
         watchdog('user', t('Login attempt failed for %user.', array('%user' => theme('placeholder', $form_values['name']))));
-        return 'user/login';
+        drupal_goto('user/login');
       }
     }
   }
@@ -781,10 +781,10 @@
   user_module_invoke('login', $edit, $user);
 
   if ($redirect != '') {
-    return '$redirect';
+    drupal_goto($redirect);
   }
 
-  return 'user/'. $user->uid;
+  drupal_goto('user/'. $user->uid);
  }
 
  function logintoboggan_eml_validate_url($account){
