now uses same rest-session instance in rest calls and socket - all tests now passes