Improving test coverage and adding api.User tests.