api coupons logout bug fix