Update button's type and add correct form submission handler

The default type value for a button is submit so there 2 submit button.
The weird thing is, when you push enter to validate the form, it should call onSubmit handler but since the first submit button has an onclick handler, its handler take precedence on onSubmit handler.
If you switch button's dom order, addTask will not be called.

These PR remove implicit behavior.