add tests for userinfo and error handling