Update auth middleware