Adjusted to permit custom user models.