some js and some session stuff