Index: typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php
===================================================================
--- typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php	(Revision 5665)
+++ typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php	(Arbeitskopie)
@@ -115,16 +115,18 @@
 		}
 
 
-
-			// Process the redirect
-		if (($this->logintype === 'login' || $this->logintype === 'logout') && $this->redirectUrl) {
-			if (!$GLOBALS['TSFE']->fe_user->cookieId) {
-				$content .= '<p style="color:red; font-weight:bold;">' . $this->pi_getLL('cookie_warning', '', 1) . '</p>';
-			} else {
-				header('Location: '.t3lib_div::locationHeaderUrl($this->redirectUrl));
-				exit;
+		if (!$this->conf['redirectOnlyOnValidSubmit'] || $this->piVars['submit']) {
+				// Process the redirect
+			if (($this->logintype === 'login' || $this->logintype === 'logout') && $this->redirectUrl) {
+				if (!$GLOBALS['TSFE']->fe_user->cookieId) {
+					$content .= '<p style="color:red; font-weight:bold;">' . $this->pi_getLL('cookie_warning', '', 1) . '</p>';
+				} else {
+					header('Location: '.t3lib_div::locationHeaderUrl($this->redirectUrl));
+					exit;
+				}
 			}
 		}
+
 		return $this->conf['wrapContentInBaseClass'] ? $this->pi_wrapInBaseClass($content) : $content;
 
 	}
@@ -190,6 +192,7 @@
 		$markerArray['###FORGOT_PASSWORD_ENTEREMAIL###'] = $this->pi_getLL('forgot_password_enterEmail', '', 1);
 		$markerArray['###FORGOT_EMAIL###'] = $this->prefixId.'[forgot_email]';
 		$markerArray['###SEND_PASSWORD###'] = $this->pi_getLL('send_password', '', 1);
+		$markerArray['###PREFIX_ID###'] = $this->prefixId;
 		$markerArray = array_merge($markerArray, $this->getUserFieldMarkers());
 
 		return $this->cObj->substituteMarkerArrayCached($subpart, $markerArray, $subpartArray, $linkpartArray);
@@ -214,6 +217,7 @@
 		$markerArray['###STORAGE_PID###'] = $this->spid;
 		$markerArray['###USERNAME###'] = htmlspecialchars($GLOBALS['TSFE']->fe_user->user['username']);
 		$markerArray['###USERNAME_LABEL###'] = $this->pi_getLL('username', '', 1);
+		$markerArray['###PREFIX_ID###'] = $this->prefixId;
 		$markerArray = array_merge($markerArray, $this->getUserFieldMarkers());
 
 		if ($this->redirectUrl) {
@@ -304,6 +308,7 @@
 		$markerArray['###STORAGE_PID###'] = $this->spid;
 		$markerArray['###USERNAME_LABEL###'] = $this->pi_getLL('username', '', 1);
 		$markerArray['###REDIRECT_URL###'] = $gpRedirectUrl ? htmlspecialchars($gpRedirectUrl) : htmlspecialchars($this->redirectUrl);
+		$markerArray['###PREFIX_ID###'] = $this->prefixId;
 		$markerArray = array_merge($markerArray, $this->getUserFieldMarkers());
 
 		if ($this->flexFormValue('showForgotPassword','sDEF') || $this->conf['showForgotPasswordLink']) {
Index: typo3/sysext/felogin/ext_typoscript_setup.txt
===================================================================
--- typo3/sysext/felogin/ext_typoscript_setup.txt	(Revision 5665)
+++ typo3/sysext/felogin/ext_typoscript_setup.txt	(Arbeitskopie)
@@ -74,6 +74,7 @@
 	redirectPageLogin =
 	redirectPageLoginError =
 	redirectPageLogout =
+	redirectOnlyOnValidSubmit =
 	
 	#disable redirect with one switch
 	redirectDisable = 
Index: typo3/sysext/felogin/template.html
===================================================================
--- typo3/sysext/felogin/template.html	(Revision 5665)
+++ typo3/sysext/felogin/template.html	(Arbeitskopie)
@@ -19,6 +19,7 @@
 	<li>###STORAGE_PID###    - explicit enough I guess (if not : id of the page where user are stored)</li>
 	<li>###STATUS_HEADER###  - depends of the template</li>
 	<li>###STATUS_MESSAGE### - depends of the template</li>
+	<li>###PREFIX_ID###      - contains the prefixId, e.g. tx_felogin_pi1</li>
 </ul>
 
 <h2>Wrap parts</h2>
@@ -71,7 +72,7 @@
 	<!--###PERMALOGIN_VALID###-->
 	
 	<div>	
-		<input type="submit" name="submit" value="###LOGIN_LABEL###" />
+		<input type="submit" name="###PREFIX_ID###[submit]" value="###LOGIN_LABEL###" />
 	</div>
 
 	<div class="felogin-hidden">
@@ -115,7 +116,7 @@
 	 	###USERNAME###
     </div>
 	<div>
-		<input type="submit" name="submit" value="###LOGOUT_LABEL###" />
+		<input type="submit" name="###PREFIX_ID###[submit]" value="###LOGOUT_LABEL###" />
 	 </div>
 	
 	<div class="felogin-hidden"> 
@@ -148,7 +149,7 @@
 		<input type="text" name="###FORGOT_EMAIL###" id="###FORGOT_EMAIL###" />
 	</div>
 	<div>
-		<input type="submit" name="submit" value="###SEND_PASSWORD###" />
+		<input type="submit" name="###PREFIX_ID###[submit]" value="###SEND_PASSWORD###" />
 	 </div>
 	</fieldset>
 </form>
