Adds support for custom user models.
Fixes #52