Fix another LoginCli test failure

This test was still failing because the password string is echoed back.
Instead of extending the regex to also account for this, I've added a
condition on STDIN that should make either case clearer and pulled the
password and exception string out to variables.