check login before purchase