Factored out creating new users in tests.
Worked out creating test users using test client; diagnostic code included.
Merge pull request #59 from ehmatthes/production_fixes

Production fixes