<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _social_auth_login(self, request, **kwargs):
    '''
        View function that redirects to social auth login,
        in case the user is not logged in.
    '''
    if request.user.is_authenticated():
        if not request.user.is_active or not request.user.is_staff:
            raise PermissionDenied()
    else:
        messages.add_message(request, messages.WARNING, 'Please authenticate first.')
        return redirect_to_login(request.get_full_path())