How do I override the login function
Hey if you have any idea about drupal form alter then go with http://api.drupal.org/api/drupal/developer!hooks!core.php/function/hook_form_alter/6.  

hope this will help you.