refine deploy script, check if password correct