Focus caret automatically at www.example.com/?q=user
This php snippet will automatically give focus to the username field when anonymous users visit www.example.com/?q=user.
The snippet should be inserted immediately before the <?php print $closure;?> tag in your page.tpl.php.
<?php
// If user is not logged in and visits user page,
// focus caret on username text input.
if ((arg(0) == "user") && (!$user->uid)) {
print "[script type=\"text/javascript\"]\n";
print "document.getElementById('edit-name').focus()\n";
print "[/script]\n";
}
?>P.S. Hoping somebody with the correct permissions can correct the opening/closing script tags in the snippet....

javascript
print "[script type=\"text/javascript\"]\n";print "document.getElementById('edit-name').focus()\n";
print "[/script]\n";
"[" should be replaced by "<". (of course, without the quotes)