Add tests for user api. mostly stubs. #401