diff --git a/login_one_time.module b/login_one_time.module
index fc8caa4..a302c71 100644
--- a/login_one_time.module
+++ b/login_one_time.module
@@ -705,13 +705,7 @@ function login_one_time_page($uid, $timestamp, $hashed_pass) {
     drupal_set_message(t('It is not necessary to use this link to login anymore. You are already logged in.'));
 
     $action = login_one_time_get_action_path();
-
-    if (!empty($action)) {
-      drupal_goto($action);
-    }
-    else {
-      drupal_goto("<front>");
-    }
+    drupal_goto($action);
   }
   else {
     // Time out, in seconds, until login URL expires. 24 hours = 86400 seconds.
@@ -761,13 +755,7 @@ function login_one_time_page($uid, $timestamp, $hashed_pass) {
 	// Add a session variable indicating whether the ignore current password field setting is enabled.
 	$_SESSION['ignore_current_pass'] = variable_get('login_one_time_user_ignore_current_pass', FALSE);
         drupal_set_message(t('You have just used your one-time login link.'));
-        if (!empty($action)) {
-          drupal_goto($action);
-        }
-        else {
-          drupal_goto("<front>");
-        }
-
+        drupal_goto($action);
       }
       else {
         drupal_set_message(t('You have tried to use a one-time login link which has been used. Please use the log in form to supply your username and password.'));
@@ -786,7 +774,11 @@ function login_one_time_page($uid, $timestamp, $hashed_pass) {
  * Get the action path for redirect.
  */
 function login_one_time_get_action_path() {
-  return urlencode($_REQUEST['destination']);
+  if (!empty($_REQUEST['destination'])) {
+    return urlencode($_REQUEST['destination']);
+  }
+
+  return '<front>';
 }
 
 /**
