Add focus to user login
You can use the drupal_match_path() function: 

$path = drupal_get_path_alias();
$pattern = 'user';

    if (drupal_match_path($path, $pattern)) {
      drupal_add_js('jQuery(document).ready(function () { jQuery("input#edit-name").focus(); });', 'inline');
    }