Modifed the model to support custom User models

Just a small change, however this allows custom user models to be used.