Adds a basic ACL logic (WIP).
Refactoring api.