added bulk permission endpoint, minor fixes