Added uid check for user APIs
Refactored user build methods