Refactor basic password checks. Closes #3552.
Merge remote-tracking branch 'ivan/feature/3552_refactor-basic-password-checks' into develop