Fix permission checking for authenticated users