Fixes session context in front office and some xhr bugs