author middleware