session persists correctly between calls