Factored out api into its own app, made some improvements to the models, added relations to user api endpoint