Adds remote user middleware