Index: modules/user.module
===================================================================
--- modules/user.module	(revision 5943)
+++ modules/user.module	(working copy)
@@ -522,7 +522,7 @@
       case 0:
         // For usability's sake, avoid showing two login forms on one page.
         if (!$user->uid && !(arg(0) == 'user' && !is_numeric(arg(1)))) {
-          $form['#action'] = url($_GET['q'], drupal_get_destination());
+          $form['#action'] = url('user', drupal_get_destination());
           $form['#attributes'] = array('id' => 'user-login-form');
           $form['name'] = array('#type' => 'textfield',
             '#title' => t('Username'),
@@ -545,7 +545,7 @@
           $items[] = l(t('Request new password'), 'user/password', array('title' => t('Request new password via e-mail.')));
           $form['links'] = array('#value' => theme('item_list', $items));
 
-          $output .= drupal_get_form('user_login_block', $form, 'user_login');
+          $output .= drupal_get_form('user_login', $form);
 
           $block['subject'] = t('User login');
           $block['content'] = $output;
