Fix non-ascii password change problem.

[Closes #4003]
Fix pep8 indent issue. And better operator usage.

- E128: continuation line under-indented for visual indent.
- Don't use identity operator to compare boolean.
Merge remote-tracking branch 'ivan/bug/4003_fix-non-ascii-password-change' into develop