Fix mistakes in access control operations

Groups where not correctly determined from the group object.
Group rights where not correctly checked.
Add performance measurement

Add utility function for logging performance metrices.
Log performance of request handlers.