changed the register button type to submit