Try this...
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<li id="name">', $txt['hello_member_ndt'], ' <em>', $context['user']['name'], '</em></li><br />
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
}
// Otherwise they're a guest - send them a lovely greeting...
else
echo sprintf($txt['welcome_guest'], $txt['guest_title']);
// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>', $txt['maintain_mode_on'], '</b><br />';