Added encoding password to support pwd with spaces