If the user is logged in and clicks on the 'login' link to bring up the popup box with the login info, the empty popup box comes up and just hangs there.

If you set up the login/registration block to only show for anonymous users this will never happen, but on some other applications it can easily happen.

For example I'm wanting to include a link to the loggin window one some pages where I can't include PHP code. So I just include something like this:

<a class=" thickbox" href="/ajax_register/login?destination=http://mobikefed.org/contribute/2">try logging in</a>

With the fix below, this works fine.

THE FIX:
A slight modification to the function ajax_register_get_ajax_login_form() fixes the problem. Here is the updated version:

function ajax_register_get_ajax_login_form() {
  //prints the html of the form to the ajax url request
  module_load_include('inc', 'user', 'user.pages');
  if (user_is_anonymous()){
      $login = drupal_get_form('user_login');
      $pass  = drupal_get_form('user_pass');
      $forgot_title = t('Forgot Your Password');
      print $login.'<br /><div><h3>'.$forgot_title.'</h3></div>'.$pass;
  } else {
      print '<br> <br> <center>You are logged in already.  <a href="#" onclick="self.parent.tb_remove();">Click here</a> 
      to continue.</center>';
  }
}
The original function is this:

 function ajax_register_get_ajax_login_form_SAVE() {
  //prints the html of the form to the ajax url request
  module_load_include('inc', 'user', 'user.pages');
  $login = drupal_get_form('user_login');
  $pass  = drupal_get_form('user_pass');
  $forgot_title = t('Forgot Your Password');
  print $login.'<br /><div><h3>'.$forgot_title.'</h3></div>'.$pass;
  //bhugh
  //print "<pre>" . htmlentities($login) . "</pre>";
}