Fix migrations for custom user models

As specified, this should sort out the custom user model migrations and stop it blowing up. Cheers.