bug #4143 :  dding support for empty password making code more robust