Added new tests

Added new tests for team and users.
Updated repository tests.
Fixed bugs.