Added conditional around account_detail pagination