Added more functionality to the password check.