The callback in ctx.login() is not being executed, "Error: Failed to serialize user into session"
`ctx.login(payload, err => {`

        if (err) {
          ctx.status.response = 400;
          ctx.response.body = { error: "dick 2" };
        } else {
         // generate a signed json web token and return it in the response
          const token = jwt.sign(JSON.stringify(payload), secret);
          console.log(token);

         // assign our jwt to the cookie
          ctx.cookies.set("jwt", jwt, { httpOnly: true, secure: true });
          ctx.response.status = 200;
          ctx.response.body = { username };
        }
      });

I'm using console.log() to see if the token is being generated but there is nothing in the output.