Added User API, new and improved models, better error handling and unit tests