Implemented authorization checks
Small fixes