diff --git a/include/client/header.inc.php b/include/client/header.inc.php
index 65ce264996fc81d02d14220f68b7a862fe0c14e1..3f84db8d133cfd4b41b1a211357d5f99670809e4 100644
--- a/include/client/header.inc.php
+++ b/include/client/header.inc.php
@@ -2,6 +2,8 @@
 $title=($cfg && is_object($cfg) && $cfg->getTitle())?$cfg->getTitle():'osTicket :: Support Ticket System';
 $signin_url = ROOT_PATH . "login.php"
     . ($thisclient ? "?e=".urlencode($thisclient->getEmail()) : "");
+$signout_url = ROOT_PATH . "logout.php?auth=".$ost->getLinkToken();
+
 header("Content-Type: text/html; charset=UTF-8\r\n");
 ?>
 <!DOCTYPE html>
@@ -51,13 +53,16 @@ header("Content-Type: text/html; charset=UTF-8\r\n");
                  ?>
                 <a href="<?php echo ROOT_PATH; ?>account.php">Profile</a> |
                 <a href="<?php echo ROOT_PATH; ?>tickets.php">Tickets <b>(<?php echo $thisclient->getNumTickets(); ?>)</b></a> -
-                <a href="<?php echo ROOT_PATH; ?>logout.php?auth=<?php echo $ost->getLinkToken(); ?>">Log Out</a>
+                <a href="<?php echo $signout_url; ?>">Sign Out</a>
             <?php
             } elseif($nav) {
                 if ($cfg->getClientRegistrationMode() == 'public') { ?>
                     Guest User | <?php
                 }
-                if ($cfg->getClientRegistrationMode() != 'disabled') { ?>
+                if ($thisclient && $thisclient->isValid() && $thisclient->isGuest()) { ?>
+                    <a href="<?php echo $signout_url; ?>">Sign Out</a><?php
+                }
+                elseif ($cfg->getClientRegistrationMode() != 'disabled') { ?>
                     <a href="<?php echo $signin_url; ?>">Sign In</a>
 <?php
                 }