fix an error in error handling on bad PW.  still need to clean this up a bit