Modifications to work with a custom user model