Allow setting the button type

This PR allows users to set the button type.

The default type for buttons is submit, which might not be what you want if you are using two async-buttons in the same form.