Added a loading toggle when button clicked