prompting for password once instead of twice