rights management middleware for connect and express