server: add log statements
session: remove redundant os.Create call from Commit method
server: move server-starting code into separate function
server: add tests