added buildModel
apiController: added checkAuth function
added packageModel