def authenticate(self, username, password):
        """
        Should try to login with abakus.no (NERD).
        """
        if getattr(settings, 'ABAKUS_DUMMY_AUTH', False):
            return self.dummy_authenticate(username, password)
        response = requests.post(url=path, data={'username': username, 'password': password})
        info = response.json()

        try:
            user_info = info['user']
        except KeyError:
            raise ApiError(info['status_message'])

        if not bool(user_info['auth']):
            return None

        if getattr(settings, 'ABAKUS_AUTH_REQUIRE_ABAKUS', False) and not user_info['is_abakus']:
            return None

        if getattr(settings, 'ABAKUS_AUTH_REQUIRE_ABAKOM', False) and not user_info['is_abakom']:
            return None

        if hasattr(settings, 'ABAKUS_GROUP_REQUIRED'):
            if not self.has_required_group(user_info):
                return None

        user = get_user_model().objects.get_or_create(username=username)[0]
        user.is_active = True
        self.parse_name(user, user_info['name'])
        user.save()

        if 'committees' in user_info:
            for committee in user_info['committees']:
                groups = Group.objects.filter(name=committee)
                if len(groups) == 1:
                    user.groups.add(groups[0])

            if hasattr(settings, 'ABAKUS_SUPERUSER_GROUPS'):
                for superuser_committee in settings.ABAKUS_SUPERUSER_GROUPS:
                    if superuser_committee in user_info['committees']:
                        user.is_superuser = True
                        user.is_staff = True
                        user.save()
                        break

        return user