Theming login page--user--login.tpl.php I'm trying to theme the login user page and it seems that I'm missing something and I can't figure out what it is.

here is what I did:

I've added this code to my template.php:

 function mxblog_theme() {
  $items = array();
  // create custom user-login.tpl.php
  $items['user_login'] = array(
  'render element' => 'form',
  'path' => drupal_get_path('theme', 'mxblog') . '/templates',
  'template' => 'page--user--login',
  'preprocess functions' => array(
  'mxblog_preprocess_user_login'
  ),
 );
return $items;
}


and this that I'm trying to render in the page--user--login.tpl.php

   print drupal_render($form['name']);
    print drupal_render($form['pass']);


    print drupal_render($form['form_build_id']);
    print drupal_render($form['form_id']);
    print drupal_render($form['actions']);
When using page--user--login.tpl.php you have to manually fetch the user login form, as your overriding the entire page template not just the form.

You can either include this directly in the template (along with any other markup):

print drupal_render(drupal_get_form('user_login'));


Or in your mxblog_preprocess_user_login() function must return the form:

function mxblog_preprocess_user_login(&amp;$variables){
  $variables['form'] = drupal_get_form('user_login');
}


then in the template you should be able to to do as you want:

print drupal_render($form['name']);
print drupal_render($form['pass']);
print drupal_render($form['form_build_id']);
print drupal_render($form['form_id']);
print drupal_render($form['actions']);