diff --git a/modules/core/lib/Auth/UserPassOrgBase.php b/modules/core/lib/Auth/UserPassOrgBase.php
index 3975ef2221ec84d1819e899590bca6824bd14969..a911097559f7507a325bc9615899ca67552b0cd5 100644
--- a/modules/core/lib/Auth/UserPassOrgBase.php
+++ b/modules/core/lib/Auth/UserPassOrgBase.php
@@ -296,7 +296,14 @@ abstract class UserPassOrgBase extends \SimpleSAML\Auth\Source
         }
 
         /* Attempt to log in. */
-        $attributes = $source->login($username, $password, $organization);
+        try {
+            $attributes = $source->login($username, $password, $organization);
+        } catch (\Exception $e) {
+            \SimpleSAML\Logger::stats('Unsuccessful login attempt from '.$_SERVER['REMOTE_ADDR'].'.');
+            throw $e;
+        }
+
+        \SimpleSAML\Logger::stats('User \''.$username.'\' at \''.$organization.'\' successfully authenticated from '.$_SERVER['REMOTE_ADDR']);
 
         // Add the selected Org to the state
         $state[self::ORGID] = $organization;