Fix session links to attach/detach correctly.  Fix boolean encoding.  Add attach/detach test case.