Added a user statistics API endpoint.