Separate service objects are created for running local and remote servers, this creates duplicate copies of different resources created inside those service. Hence users authenticated on local server are not available on remote access and vice versa. Similarly two copies of HDAShares and other resources are maintained which is unnecessary.
This can be resolved by creating only a single copy of service and using it for both local as well as remote server.