[FIX] Log SQL errors on invalid checkUserPassword

Fixes #1366 once merged.
Merge pull request #1368 from TheSerapher/issue-1366

[FIX] Log SQL errors on invalid checkUserPassword