Outputting the login form

Joined: 03/09/2009

I am trying to insert a login form at the top of the page in a theme I am working on, in a very similar fashion to the one on this site when logged out. I am currently using Drupal's drupal_get_form function defined within a new function in my template.php. But, the form is doing some strange things when output. Mostly with the OpenID's show/hide javascript stuff. Any ideas on how I can get it to work properly. I can't figure it out, from my understanding it should be outputting the same code as it would in a block (since that's the form I'm calling), but it's not?

*note: I have done ZERO amount of styling to this form, neither CSS or jQuery.

Here is the code for my new function in which I am calling the form:

<?php
function login_box() {
  global $user;                                                               
  $output = '';
 
  if (!$user->uid) {                                                          
    $output .= drupal_get_form('user_login_block');                           
  }                                                                           
  else {                                                                      
    $output .= t('<p class="user-info">Hi !user, welcome back.</p>', array('!user' => theme('username', $user)));
 
    $output .= theme('item_list', array(
      l(t('Your account'), 'user/'.$user->uid, array('title' => t('Edit your account'))),
      l(t('Sign out'), 'logout')));
  }
 
  $output = '<div id="user-bar">'.$output.'</div>';
 
  return $output;
}

And here is an image of what it's outputting:
http://thomaslattimore.com/sites/default/files/log...