Refactor API tests
Refactor join tests
Refactor lib/user tests