added user validation and password functionality