Changes to API

Added permission control to all functions

Added "adduser"-functionality