[#1393] user_dictize: return apikey correctly

Was returning email instead of apikey. Fixes #1393
[#1392] more fixes from awful commit + tests
[#1392] pep8 fix
Merge branch '1393-bug-user-create-returns-email-for-api-key'