You need to use a hook or theming the form. See Customizing the login form.
Step 1 of 2
In a text editor like notepad.exe, create a file called template.php using the the following snippet. If you already have a template.php file, simply add it to your existing one.
Form variables are declared as render elements in hook_theme functions that handle form or element theming. See the hook_theme API documentation for more information.
function mytheme_theme(&$existing, $type, $theme, $path) {
$hooks['user_login'] = array(
'template' => 'templates/user_login',
'render element' => 'form',
// other theme registration code...
);
return $hooks;
}
function mytheme_preprocess_user_login(&$variables) {
$variables['intro_text'] = t('This is my awesome login form');
$variables['rendered'] = drupal_render_children($variables['form']);
}
Step 2 of 2
Style sheet reference
For controlling how your login form looks using your style sheet, this is what the rendered login form HTML and class names are by default:
<div class="form-item">
<label for="edit-name">Username: <span class="form-required" title="This field is required.">*</span></label>
<input type="text" maxlength="60" name="name" id="edit-name" size="30" value="" tabindex="1" class="form-text required" />
<div class="description">enter your username</div>
</div>
<div class="form-item">
<label for="edit-pass">Password: <span class="form-required" title="This field is required.">*</span></label>
<input type="password" name="pass" id="edit-pass" size="40" tabindex="2" class="form-text required" />
<div class="description">enter your password</div>
</div>
<input type="hidden" name="form_id" id="edit-user-login" value="user_login" />
<input type="submit" name="op" id="edit-submit" value="Log in" tabindex="3" class="form-submit" />
<p><a class="textlink" href="?q=user/password">Forgotten your Password?</a></p>
(The PHP code shown is for Drupal 7.)