Team and Team API development

Added some user authorization protection for some team functions.