Implemented permissions.
Added more checks if the user has the specified permission
The permissions should work now
Added read/unread pms
A note how to reduce the queries later..
PM unread count
Further work on the admin panel