fixing the remote user auth middleware to accept both local and remote connections