diff --git a/modules/user/user.module b/modules/user/user.module
index 2309aa9296..321bab1384 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -2225,10 +2225,12 @@ function user_login_final_validate($form, &$form_state) {
     if (isset($form_state['flood_control_triggered'])) {
       if ($form_state['flood_control_triggered'] == 'user') {
         form_set_error('name', format_plural(variable_get('user_failed_login_user_limit', 5), 'Sorry, there has been more than one failed login attempt for this account. It is temporarily blocked. Try again later or <a href="@url">request a new password</a>.', 'Sorry, there have been more than @count failed login attempts for this account. It is temporarily blocked. Try again later or <a href="@url">request a new password</a>.', array('@url' => url('user/password'))));
+        watchdog('user', 'Flood control blocked login attempt for %user from %ip.', array('%user' => $form_state['values']['name'], '%ip' =>isset($form_state['flood_control_user_identifier']) ? $form_state['flood_control_user_identifier'] : ip_address()));
       }
       else {
         // We did not find a uid, so the limit is IP-based.
         form_set_error('name', t('Sorry, too many failed login attempts from your IP address. This IP address is temporarily blocked. Try again later or <a href="@url">request a new password</a>.', array('@url' => url('user/password'))));
+        watchdog('user', 'Flood control blocked login attempt from %ip.', array('%ip' =>isset($form_state['flood_control_user_identifier']) ? $form_state['flood_control_user_identifier'] : ip_address()));
       }
     }
     else {
@@ -2239,6 +2241,7 @@ function user_login_final_validate($form, &$form_state) {
       form_set_error('name', t('Sorry, unrecognized username or password. <a href="@password">Have you forgotten your password?</a>', array('@password' => url('user/password', array('query' => $query)))));
       watchdog('user', 'Login attempt failed for %user.', array('%user' => $form_state['values']['name']));
     }
+    drupal_access_denied();
   }
   elseif (isset($form_state['flood_control_user_identifier'])) {
     // Clear past failures for this user so as not to block a user who might
diff --git a/modules/user/user.test b/modules/user/user.test
index fb82c93c22..b3be9e800d 100644
--- a/modules/user/user.test
+++ b/modules/user/user.test
@@ -438,15 +438,20 @@ class UserLoginTestCase extends DrupalWebTestCase {
     $this->drupalPost('user', $edit, t('Log in'));
     $this->assertNoFieldByXPath("//input[@name='pass' and @value!='']", NULL, 'Password value attribute is blank.');
     if (isset($flood_trigger)) {
+      $this->assertResponse(403);
+      $last_log = db_query_range('SELECT message FROM {watchdog} WHERE type = :type ORDER BY wid DESC', 0, 1, array(':type' => 'user'))->fetchField();
       if ($flood_trigger == 'user') {
-        $this->assertRaw(format_plural(variable_get('user_failed_login_user_limit', 5), 'Sorry, there has been more than one failed login attempt for this account. It is temporarily blocked. Try again later or <a href="@url">request a new password</a>.', 'Sorry, there have been more than @count failed login attempts for this account. It is temporarily blocked. Try again later or <a href="@url">request a new password</a>.', array('@url' => url('user/password'))));
+        $this->assertRaw(t('Too many failed login attempts for this account. It is temporarily blocked. Try again later or <a href="@url">request a new password</a>.', array('@url' => url('user/password'))));
+        $this->assertEqual('Flood control blocked login attempt for %user from %ip.', $last_log, 'A watchdog message was logged for the login attempt blocked by flood control per user');
       }
       else {
         // No uid, so the limit is IP-based.
         $this->assertRaw(t('Sorry, too many failed login attempts from your IP address. This IP address is temporarily blocked. Try again later or <a href="@url">request a new password</a>.', array('@url' => url('user/password'))));
+        $this->assertEqual('Flood control blocked login attempt from %ip.', $last_log, 'A watchdog message was logged for the login attempt blocked by flood control per IP');
       }
     }
     else {
+      $this->assertResponse(200);
       $this->assertText(t('Sorry, unrecognized username or password. Have you forgotten your password?'));
     }
   }
