API tweaks

Initial work on API and looking at indexes for query patterns.
Devise has test helpers we could include instead. https://github.com/plataformatec/devise#test-helpers