Adding simple switch-user function

Added a simple switch-user function, takes a handler expects
a function to find out the user to switch.

Depends on the wrap-session function