updated to work with custom user models
Merge branch 'develop'