from django.contrib.auth import REDIRECT_FIELD_NAME
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth.views import login as django_login
from social_auth.views import list as social_list


def login(request, template_name='registration/login.html',
          redirect_field_name=REDIRECT_FIELD_NAME,
          authentication_form=AuthenticationForm,
          current_app=None):
    
    extra_context = {'social_list': social_list}
    
    return django_login(request, template_name, redirect_field_name, authentication_form, current_app, extra_context)
