completing password validation and authentiction