The request from ulogin service is correct

def form_valid(self, form):
        """
        The request from ulogin service is correct
        """
        response = self.ulogin_response(form.cleaned_data['token'],
                                        self.request.get_host())

        if 'error' in response:
            return render(self.request, self.error_template_name,
                          {'json': response})

        if user_is_authenticated(get_user(self.request)):
            user, identity, registered = \
                self.handle_authenticated_user(response)
        else:
            user, identity, registered = \
                self.handle_anonymous_user(response)

        assign.send(sender=ULoginUser,
                    user=get_user(self.request),
                    request=self.request,
                    registered=registered,
                    ulogin_user=identity,
                    ulogin_data=response)
        return redirect(self.request.GET.get(REDIRECT_FIELD_NAME) or '/')