title: custom horizontal login using email is not working in drupal 6
body: <p>i am trying to make a custom login form in drupal-6.22 using Email Registration module &amp; using danland theme.</p>
  
  <p>in template.php file i made few changes as </p>
  
  <pre><code>function get_user_login_form() {
    $form_id = 'user-login-form';
    $form = array();
    $form['name'] = array(
      '#type' =&gt; 'textfield',
      '#maxlength' =&gt; USERNAME_MAX_LENGTH,
      '#required' =&gt; TRUE,
      '#size' =&gt; 10,
      '#attributes' =&gt; array('tabindex' =&gt; '1','title'=&gt;'E-mail'),
    );
    $form['pass'] = array(
      '#type' =&gt; 'password',
      '#required' =&gt; TRUE,
      '#size' =&gt; 10,
      '#attributes' =&gt; array('tabindex' =&gt; '2','title'=&gt;'Password'),
    );
    $form['submit'] = array(
      '#type' =&gt; 'submit',
      '#value' =&gt; t(''),
      '#weight' =&gt; 2,
      '#attributes' =&gt; array('tabindex' =&gt; '3')
    );
    $form['#validate'] = user_login_default_validators();
    $form['#build_id'] = sprintf('form-%s', md5(uniqid(mt_rand(), TRUE)));
    $form_state = array();
    drupal_prepare_form($form_id, $form, $form_state);
    drupal_process_form($form_id, $form, $form_state);
    $out = new stdClass;
    $out-&gt;form_start =
      sprintf("&lt;form method='post' accept-charset='UTF-8' action='%s'&gt;",
      url('user/login'));
    $out-&gt;form_end = "&lt;/form&gt;";
    $out-&gt;name = drupal_render($form['name']);
    $out-&gt;pass = drupal_render($form['pass']);
    $out-&gt;submit =
      drupal_render($form['form_id']) .
      drupal_render($form['form_build_id']).
      drupal_render($form['submit']);
    return $out;
  }
  </code></pre>
  
  <p>And in page.tpl.php i inserted this code</p>
  
  <pre><code>&lt;?php
          $login_form = get_user_login_form(); 
          ?&gt;
          &lt;?php print $login_form-&gt;form_start; ?&gt;
          &lt;div class="name-tag"&gt;&lt;?php print $login_form-&gt;name; ?&gt;&lt;/div&gt;&lt;div class="pass-tag"&gt;&lt;?php print $login_form-&gt;pass; ?&gt;&lt;/div&gt;&lt;div class="submit-tag"&gt;&lt;?php print $login_form-&gt;submit; ?&gt;&lt;/div&gt;
          &lt;?php print $login_form-&gt;form_end;
  ?&gt;
  </code></pre>
  
  <p>then i am trying to login using email but its not working. this code is generating html form like as</p>
  
  <pre><code>&lt;form method='post' accept-charset='UTF-8' action='/dru/user/login'&gt;        &lt;div class="name-tag"&gt;&lt;div class="form-item" id="edit-name-1-wrapper"&gt;
   &lt;input type="text" maxlength="60" name="name" id="edit-name-1" size="10" value="" tabindex="1" title="E-mail" class="form-text required" /&gt;
  &lt;/div&gt;
  &lt;/div&gt;&lt;div class="pass-tag"&gt;&lt;div class="form-item" id="edit-pass-1-wrapper"&gt;
  
   &lt;input type="password" name="pass" id="edit-pass-1"  maxlength="128"  size="10"  tabindex="2" title="Password" class="form-text required" /&gt;
  &lt;/div&gt;
  &lt;/div&gt;&lt;div class="submit-tag"&gt;&lt;input type="hidden" name="form_id" id="edit-user-login-form" value="user-login-form"  /&gt;
  &lt;input type="hidden" name="form_build_id" id="form-8d944c2ceca0b8a4141c73564d35b69b" value="form-8d944c2ceca0b8a4141c73564d35b69b"  /&gt;
  &lt;input type="submit" name="op" id="edit-submit-2" value=""  tabindex="3" class="form-submit" /&gt;
  &lt;/div&gt;
          &lt;/form&gt;
  </code></pre>
  
  <p>here if i am disabling email-registration module &amp; changing 'title'=>'E-mail' to 'title'=>'name' in attribute tag its working fine for names. whatever css id it is generating it is adding extra text "-1" in html output. i think it is creating problem.</p>