adding users endpoint, and making output for stats more flexible