Add test around creating a team

This also changes logging for sending emails to invited users. Since
it's not super critical if it fails (it seems), don't log in the test environment.