Improved docs, improved tests, added events for unauthorized actions, improved events and permission keys