use login name to verify password
Merge pull request #12391 from owncloud/fix_12361

use login name to verify password