Public API

Refactors the specs a lot and adds a public API with authentication