more work on identity model and api tests