Fix object is not JSON serializable when using session in oauth callback