More changes to support custom user model