Password and data validation before authentication added.