Added logging and fixed a small error reading the password from password
prompt.