add support for resource server with session id logic