Fetch available repositories the same way as other data

Don't store it in json like before.

Also add a "Team" model and code to fetch teams, but unused for now. May be useful when we'll implement workspaces ?