Fixed some bugs. Added preliminary support of authorizations for users and processes.
Improved implementation of the API.