I suspect there's a lot difference methods to do something similar, but it all depends on what exactly you want to do and how you're going to "catch" remote_user on next service?
Can you give some examples of your current setup and further explain what exactly you want to do?