diff --git a/modules/node.module b/modules/node.module
index bb5700483de64806d0a35b7ea43e1708646c2af5..14d7ac80b1acc8c674c0be24a8cd6d451161b4df 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -1115,11 +1115,6 @@ function node_filter_form_submit() {
     case t('Reset'):
       $_SESSION['node_overview_filter'] = array();
       break;
-    case t('Update'):
-      return;
-  }
-  if ($op != '') {
-    return 'admin/node';
   }
 }
 
@@ -1137,7 +1132,6 @@ function node_admin_nodes_submit($form_id, $edit) {
       }
     }
     drupal_set_message(t('The update has been performed.'));
-    return 'admin/node';
   }
 }
 
@@ -1874,9 +1868,16 @@ function node_form_submit($form_id, $edit) {
       drupal_set_message(t('Your %post was created.', array ('%post' => node_get_name($node))));
     }
   }
-  if ($node->nid && node_access('view', $node)) {
-    return 'node/'. $node->nid;
+  if ($node->nid) {
+    if (node_access('view', $node)) {
+      return 'node/'. $node->nid;
+    }
+    else {
+      return '';
+    }
   }
+  // it is very unlikely we get here
+  return FALSE;
 }
 
 /**
diff --git a/modules/node/node.module b/modules/node/node.module
index bb5700483de64806d0a35b7ea43e1708646c2af5..14d7ac80b1acc8c674c0be24a8cd6d451161b4df 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1115,11 +1115,6 @@ function node_filter_form_submit() {
     case t('Reset'):
       $_SESSION['node_overview_filter'] = array();
       break;
-    case t('Update'):
-      return;
-  }
-  if ($op != '') {
-    return 'admin/node';
   }
 }
 
@@ -1137,7 +1132,6 @@ function node_admin_nodes_submit($form_id, $edit) {
       }
     }
     drupal_set_message(t('The update has been performed.'));
-    return 'admin/node';
   }
 }
 
@@ -1874,9 +1868,16 @@ function node_form_submit($form_id, $edit) {
       drupal_set_message(t('Your %post was created.', array ('%post' => node_get_name($node))));
     }
   }
-  if ($node->nid && node_access('view', $node)) {
-    return 'node/'. $node->nid;
+  if ($node->nid) {
+    if (node_access('view', $node)) {
+      return 'node/'. $node->nid;
+    }
+    else {
+      return '';
+    }
   }
+  // it is very unlikely we get here
+  return FALSE;
 }
 
 /**
diff --git a/modules/system.module b/modules/system.module
index 56e54885d3ca5572a64d718b2ab5d12f78f8c4db..494c9fa5f5948bfb591fc46e8dcbd7a5d008e745 100644
--- a/modules/system.module
+++ b/modules/system.module
@@ -55,7 +55,7 @@ function system_perm() {
  */
 function system_elements() {
   // Top level form
-  $type['form'] = array('#method' => 'post', '#action' => request_uri(), '#redirect' => '');
+  $type['form'] = array('#method' => 'post', '#action' => request_uri(), '#redirect' => $_GET['q']);
 
   // Inputs
   $type['checkbox'] = array('#input' => TRUE, '#return_value' => 1);
diff --git a/modules/system/system.module b/modules/system/system.module
index 56e54885d3ca5572a64d718b2ab5d12f78f8c4db..494c9fa5f5948bfb591fc46e8dcbd7a5d008e745 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -55,7 +55,7 @@ function system_perm() {
  */
 function system_elements() {
   // Top level form
-  $type['form'] = array('#method' => 'post', '#action' => request_uri(), '#redirect' => '');
+  $type['form'] = array('#method' => 'post', '#action' => request_uri(), '#redirect' => $_GET['q']);
 
   // Inputs
   $type['checkbox'] = array('#input' => TRUE, '#return_value' => 1);
diff --git a/modules/user.module b/modules/user.module
index d2c3d94de8fae6bea49a961c0fb8bf65cba44e20..1601ba02a7dddb8c38fd28a3e2b4227301ed91d8 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -1034,7 +1034,7 @@ function user_pass_submit($form_id, $form_values) {
   $mail_success = user_mail($account->mail, $subject, $body, $headers);
 
   if ($mail_success) {
-      watchdog('user', t('Password reset instructions mailed to %name at %email.', array('%name' => '<em>'. $account->name .'</em>', '%email' => '<em>'. $account->mail .'</em>')));
+    watchdog('user', t('Password reset instructions mailed to %name at %email.', array('%name' => '<em>'. $account->name .'</em>', '%email' => '<em>'. $account->mail .'</em>')));
     drupal_set_message(t('Further instructions have been sent to your e-mail address.'));
   }
   else {
@@ -1220,7 +1220,7 @@ function user_register_submit($form_id, $form_values) {
       $body = _user_mail_text('welcome_body', $variables);
       user_mail($mail, $subject, $body, "From: $from\nReply-to: $from\nX-Mailer: Drupal\nReturn-path: $from\nErrors-to: $from");
       drupal_set_message(t('Your password and further instructions have been sent to your e-mail address.'));
-
+      return '';
     }
     else {
       // Create new user account, administrator approval required.
diff --git a/modules/user/user.module b/modules/user/user.module
index d2c3d94de8fae6bea49a961c0fb8bf65cba44e20..1601ba02a7dddb8c38fd28a3e2b4227301ed91d8 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -1034,7 +1034,7 @@ function user_pass_submit($form_id, $form_values) {
   $mail_success = user_mail($account->mail, $subject, $body, $headers);
 
   if ($mail_success) {
-      watchdog('user', t('Password reset instructions mailed to %name at %email.', array('%name' => '<em>'. $account->name .'</em>', '%email' => '<em>'. $account->mail .'</em>')));
+    watchdog('user', t('Password reset instructions mailed to %name at %email.', array('%name' => '<em>'. $account->name .'</em>', '%email' => '<em>'. $account->mail .'</em>')));
     drupal_set_message(t('Further instructions have been sent to your e-mail address.'));
   }
   else {
@@ -1220,7 +1220,7 @@ function user_register_submit($form_id, $form_values) {
       $body = _user_mail_text('welcome_body', $variables);
       user_mail($mail, $subject, $body, "From: $from\nReply-to: $from\nX-Mailer: Drupal\nReturn-path: $from\nErrors-to: $from");
       drupal_set_message(t('Your password and further instructions have been sent to your e-mail address.'));
-
+      return '';
     }
     else {
       // Create new user account, administrator approval required.