add support for custom user models

Note: User is also imported in the tests, but I don't think it makes a difference there.