Squashed a bug that would delete old logs if upload of a new one failed
Made persistent sessions over server restart possible, along with some
other fixes.