models for each resource, and login/registation process