Fix auth
Include phpunit
Include basic unit tests for API