API post working correctly, refactored controller queries to User model, added controller tests