docs: def validate(self, attrs):
          """ checks if login credentials are correct """
          user = authenticate(**self.user_credentials(attrs))
  
          if user:
              if user.is_active:
                  self.instance = user
              else:
                  raise serializers.ValidationError(_("This account is currently inactive."))
          else:
              error = _("Invalid login credentials.")
              raise serializers.ValidationError(error)
          return attrs