support api_key and agent on registration and auth