Hide user password in CLI if possible

Fix security issue #1198