This post may answer your question. A widgetized version is also available now.
This chunk of code should also work. Put it in your sidebar somewhere:
<?php if (isset($user_level) && $user_level > 0): ?>
<div>
<ul>
<li><a href="<?php bloginfo('wpurl'); ?>/admin/" title="admin">Site Admin</a></li>
<li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=logout&redirect_to=<?php echo $_SERVER['REQUEST_URI']; ?>" title="logout">Logout (<?php echo $user_nickname; ?>)</a></li>
</ul>
</div>
<?php else: ?>
<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="20" tabindex="7" /></label>
<label><?php _e('Password') ?>: <input type="password" name="pwd" id="pwd" value="" size="20" tabindex="8" /></label>
<input type="submit" name="submit" value="<?php _e('Login'); ?> »" tabindex="9" style="margin-top: 0.5em" />
<?php wp_register(); ?>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/>
</form>
<?php endif; ?>
Why do you start your post with “So”? It isn’t necessary. We weren’t in the middle of a conversation where you were explaining something that came before.
Dude.