added team selection on join, fixed lots of bugs