updated users API, and added documentation