added logging support and pluggable user context provider