Index: trunk/docs/examples/script_template.php
===================================================================
--- trunk/docs/examples/script_template.php	(revision 761)
+++ trunk/docs/examples/script_template.php	(revision 762)
@@ -4,5 +4,5 @@
  * For details visit the project site: <http://trac.strangecode.com/codebase/>
  * Copyright 2001-2012 Strangecode, LLC
- * 
+ *
  * This file is part of The Strangecode Codebase.
  *
@@ -11,10 +11,10 @@
  * Free Software Foundation, either version 3 of the License, or (at your option)
  * any later version.
- * 
+ *
  * The Strangecode Codebase is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  * details.
- * 
+ *
  * You should have received a copy of the GNU General Public License along with
  * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>.
@@ -32,5 +32,4 @@
 
 $auth->requireLogin();
-$app->sslOn();
 
 require_once 'codebase/lib/FormValidator.inc.php';
Index: trunk/lib/App.inc.php
===================================================================
--- trunk/lib/App.inc.php	(revision 761)
+++ trunk/lib/App.inc.php	(revision 762)
@@ -341,7 +341,8 @@
      * @access  public
      * @param   string  $param      The key of the parameter to return.
+     * @param   string  $default    The value to return if $param does not exist in $this->_params.
      * @return  mixed               Parameter value, or null if not existing.
      */
-    public function getParam($param=null)
+    public function getParam($param=null, $default=null)
     {
         if ($param === null) {
@@ -350,5 +351,5 @@
             return $this->_params[$param];
         } else {
-            return null;
+            return $default;
         }
     }
Index: trunk/services/admins.php
===================================================================
--- trunk/services/admins.php	(revision 761)
+++ trunk/services/admins.php	(revision 762)
@@ -27,5 +27,4 @@
 // require_once dirname(__FILE__) . '/_config.inc.php';
 
-$app->sslOn();
 $auth->requireLogin();
 
Index: trunk/services/lock.php
===================================================================
--- trunk/services/lock.php	(revision 761)
+++ trunk/services/lock.php	(revision 762)
@@ -34,5 +34,4 @@
 require_once 'codebase/lib/HTML.inc.php';
 
-$app->sslOn();
 $auth->requireLogin();
 
Index: trunk/services/login.php
===================================================================
--- trunk/services/login.php	(revision 761)
+++ trunk/services/login.php	(revision 762)
@@ -37,5 +37,11 @@
     $app->setBoomerangURL($url, 'login');
 }
-$app->sslOn();
+
+if ($auth->isLoggedIn()) {
+    if ($app->validBoomerangURL('login')) {
+        $app->dieBoomerangURL('login');
+    }
+    $app->dieBoomerangURL($app->getParam('redirect_home_url', '/'));
+}
 
 // Cookie-based storage preferences.
Index: trunk/services/logs.php
===================================================================
--- trunk/services/logs.php	(revision 761)
+++ trunk/services/logs.php	(revision 762)
@@ -31,5 +31,4 @@
 )));
 
-$app->sslOn();
 $auth->requireLogin();
 
Index: trunk/services/password.php
===================================================================
--- trunk/services/password.php	(revision 761)
+++ trunk/services/password.php	(revision 762)
@@ -55,5 +55,4 @@
     $app->setBoomerangURL($_SERVER['HTTP_REFERER'], 'admin_password');
 }
-$app->sslOn();
 
 switch (getFormData('op')) {
Index: trunk/services/reset_password.php
===================================================================
--- trunk/services/reset_password.php	(revision 761)
+++ trunk/services/reset_password.php	(revision 762)
@@ -55,6 +55,4 @@
 }
 
-$app->sslOn();
-
 switch (getFormData('op')) {
 case 'reset' :
Index: trunk/services/versions.php
===================================================================
--- trunk/services/versions.php	(revision 761)
+++ trunk/services/versions.php	(revision 762)
@@ -27,5 +27,4 @@
 // require_once dirname(__FILE__) . '/_config.inc.php';
 
-$app->sslOn();
 $auth->requireLogin();
 
