Added logic for creating hashed password and validating