Fix migrations to work with custom user model

Fix migrations to work with custom user model