Get User model dynamically

Hi,
I made a change to get user model dynamically, because in my project, I use a custom user model. I think that is useful in other projects.