Simplified session-resuming code a bit.
Fixed session resuming on classicube.net, and made login error handling more robust overall.