fix registerUser to stop generating keys for invalid users