rewrite: Fix a couple of mistakes in models/users.py
rewrite: Add tests to ensure compatibility with legacy api for the few applications that do use it
rewrite: configure travis-ci