restul: fix for testing accesstoken

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>
messages: code refactoring and REST API

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>