diff --git a/ldap_sso/ldap_sso.module b/ldap_sso/ldap_sso.module
index 9d827cf..0ce03a0 100644
--- a/ldap_sso/ldap_sso.module
+++ b/ldap_sso/ldap_sso.module
@@ -62,7 +62,7 @@ function ldap_sso_boot() {
         if ($ldap_authentication_conf['seamlessLogin'] == 1 && ($login_attempted != 'true')) {
           setcookie("seamless_login_attempted", 'true', time() + (int)$auth_conf->cookieExpire, base_path(), "");
           $_SESSION['seamless_login_attempted'] = $login_attempted;
-          drupal_goto('user/login/sso', array('query' => array('destination' => rawurlencode($_GET['q']))));
+          drupal_goto('user/login/sso', array('alias' => TRUE, 'query' => array('destination' => rawurlencode($_GET['q']))));
         }
         else {
           return;
@@ -123,24 +123,26 @@ function ldap_sso_user_login_sso() {
           $_SESSION['seamless_login'] = 'auto login';
           setcookie("seamless_login_attempted", '');
           unset($_SESSION['seamless_login_attempted']);
-
-      }
-      drupal_set_message(theme('ldap_authentication_login_message',
-                                  array('message' => t('You have been successfully authenticated'))));
-      drupal_goto('<front>');
-      }
-      else {
+        }
+        drupal_set_message(theme('ldap_authentication_login_message',
+                                    array('message' => t('You have been successfully authenticated'))));
+        // TODO This should not be necessary but destination gets mangled somewhere before this point - Jon
+        if(isset($_GET['destination'])) $_GET['destination'] = str_replace(array('%252F','%2F'), '/', $_GET['destination']);
+        drupal_goto('<front>');
+      } else {
         if ($auth_conf->seamlessLogin == 1) {
-          setcookie("seamless_login", 'do not auto login', time() + $auth_conf->cookieExpire, base_path(), "");
-          $_SESSION['seamless_login'] = 'do not auto login';
-      }
-      drupal_set_message(theme('ldap_authentication_message_not_found',
-          array('message' => t('Sorry, your LDAP credentials were not found, ' .
-          'or the LDAP server is not available. You may log in ' .
-           'with other credentials on the !user_login_form.',
-            array('!user_login_form' => l(t('user login form'), 'user/login'))))
-        ), 'error');
-      drupal_goto('user/login');
+            setcookie("seamless_login", 'do not auto login', time() + $auth_conf->cookieExpire, base_path(), "");
+            $_SESSION['seamless_login'] = 'do not auto login';
+        }
+        drupal_set_message(theme('ldap_authentication_message_not_found',
+            array('message' => t('Sorry, your LDAP credentials were not found, ' .
+            'or the LDAP server is not available. You may log in ' .
+             'with other credentials on the !user_login_form.',
+              array('!user_login_form' => l(t('user login form'), 'user/login'))))
+          ), 'error');
+        // TODO This should not be necessary but destination gets mangled somewhere before this point - Jon
+        if(isset($_GET['destination'])) $_GET['destination'] = str_replace(array('%252F','%2F'), '/', $_GET['destination']);
+        drupal_goto('user/login');
       }
     }
     else {
