added a check to make sure the account was approved and confirmed