add loading state to button