More on authetication/authorization structure.

Some refactoring for access control
Tests (client and server) for user, main and lecturer
Security module created in the server.