Implemented and test join team

These are changes to add capability to join a team for both managed and
unmanaged teams.