refactored logic for password field in base.js
Merge branch 'password-field' into dev