Added client-side de authorization checks.
Added server-side authorization checks for user permissions.