Fixed 0005 migration wrt custom user models

This fixes the core:0005 migration