Tons of fixes.

methods moved to server, error on joining null, refactored lobby
template, etc.