moved the teams proxy over to a seperate proxy helper file in lib

Moved the proxy route setting in the teams controller over to a reusable lib file.