Refactor joining of leagues