The below theme snippet can be pasted into themes to allow direct, on page, login/logout and admin link called “My Profile”. Its extremely usefull and removes the need to setup and layout a seperate login page while integrating … a link to administer the website after successfull login.
<div id="login">
<?php global $userdata;
get_currentuserinfo();
if (!is_user_logged_in()) { ?>
<form action="wp-login.php?redirect_to=http%3A%2F%2FYOURWEBSITEHERE.com&_wpnonce=ccdfa347ee" method="post">
Username: <input type="text" name="log" id="user_login" />
Password:<input type="password" name="pwd" id="user_pass" />
<input type="hidden" name="testcookie" value="1" />
<input name="rememberme" type="checkbox" id="rememberme" value="forever" checked /> Remember Me
<input type="submit" name="wp-submit" id="wp-submit" value="Log In" />
</form>
<?php } else { ?>
Welcome back <?php echo($userdata->display_name) ?> | <a href="<?php bloginfo(wpurl) ?>/wp-admin" title="My Account">My Account</a> | <?php wp_loginout(get_bloginfo(wpurl)) ?>
<?php } ?>
</div>