Passing config and sessiondata to msghandler