copy from django-allauth for customization