Move authentication failed logging to checkPassword

Fixes https://github.com/owncloud/core/issues/10366
Fix unit test
Merge pull request #10442 from owncloud/move-failed-logins

Move authentication failed logging to checkPassword