Move detection of existing password mode to one place.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>