Creates a new password and checks for validity