modified session APIs to be more friendly
updated code and glyph server examples to match