Reorder adding loading class to button