added PersistentStore class for auth cleanup
moved Yggdrasil and session setup code to auth, cleaned up conn
fix infinite loop when encountering EOF