Add more tests to api and client, update backend tests as well