Better way of setting passwords