Added password confirmation and extracted from server