moved getSessionDocument into globalhelpers.js, now located in client/lib for load order