Put read_password into a separate function.