Fix custom user model admin

rebase of #3377