<?php
global $user_login, $user_identity;
get_currentuserinfo();
if ($user_login) :
?>
<h2>Welcome Back <?php echo $user_identity; ?>!</h2>
<ul> <?php
$date = date("D M j G:i:s Y", time()+60*60*$diff=-3);
print ($date);
?>
<br /><?php wp_register(); ?><br />
<a href="<?php echo get_settings('siteurl') . '/wp-login.php?action=logout&redirect_to=' . $_SERVER['REQUEST_URI']; ?>"><?php _e('Logout'); ?></a>
</ul>
DO LOGGED IN STUFF HERE
<?php else : ?>
<li><h2>Welcome Guest! </h2>
Please Login or <?php wp_register('', ''); ?> for member's benefits.<br />
<form name="loginform" id="loginform" action="<?php echo get_settings('siteurl'); ?>/wp-login.php" method="post">
<label><?php _e('Login') ?>: <input type="text" name="log" id="log" value="" size="10" maxlength="30" tabindex="7" /></label><br /><br />
<label><?php _e('Password') ?>: <input type="password" name="pwd" id="pwd" value="" size="10" maxlength="30" tabindex="8" /></label><br /><br />
<input type="hidden" name="rememberme" value="forever" />
<center><input type="submit" name="submit" value="<?php _e('Login'); ?> »" tabindex="9" /></center>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/>
</form>
<?php endif; ?>