password prompt and error catching