--- /Users/sbourget/Downloads/mrbs/web/session_php.php	2008-08-03 08:22:18.000000000 -0400
+++ /Users/sbourget/Sites/moodle19/blocks/mrbs/web/session_php.php	2008-08-17 17:21:07.000000000 -0400
@@ -85,40 +85,10 @@
 function printLoginForm($TargetURL)
 {
     global $PHP_SELF;
-?>
-<p>
-  <?php echo get_string('loginsite') ?>
-</p>
-<form method="post" action="<?php echo basename($PHP_SELF) ?>">
-  <table>
-    <tr>
-      <td align="right"><?php echo get_string('username') ?></td>
-      <td><input type="text" name="NewUserName" /></td>
-    </tr>
-    <tr>
-      <td align="right"><?php echo get_string('password') ?></td>
-      <td><input type="password" name="NewUserPassword" /></td>
-    </tr>
-  </table>
-  <input type="hidden" name="TargetURL" value="<?php echo $TargetURL ?>" /> <br />
-  <input type="hidden" name="Action" value="SetName" /> <br />
-  <input type="submit" value=" <?php echo get_string('login') ?> " /> <br />
-</form>
-</body>
-</html>
-<?php
+   $SESSION->wantsurl = $TargetURL;
+   require_login();    
 }
 
-/*
-  Target of the form with sets the URL argument "Action=QueryName".
-  Will eventually return to URL argument "TargetURL=whatever".
-*/
-if (isset($Action) && ($Action == "QueryName"))
-{
-    print_header_mrbs(0, 0, 0, 0);
-    printLoginForm($TargetURL);
-    exit();
-}
 
 /* authGet()
  * 
