Added validation for passwords