} else {
    ?>

<?php 
    if (isset($_SESSION['yahoo_oauth_request_token'])) {
        ?>
<div id="ysimpleauth-logout" class="authbar"><a href="simpleauth.php?openid_mode=cancel">Logout</a></div>
<?php 
    }
    ?>

<?php 
    // fetch latest user data
    $profile = $oauthapp->getProfile();
    $updates = $oauthapp->getUpdates(null, 0, 20);
    $connections = $oauthapp->getConnections(null, 0, 1000);
    ?>

<div id="profile" class="yui-b">
  <div class="vcard">
    <span class="fn n">
  		<a href="<?php 
    echo $profile->profileUrl;
    ?>
"  title="<?php 
    echo $profile->nickname;
    ?>
's Profile" ><img src="<?php 
    echo $profile->image->imageUrl;
    ?>
" height="<?php