modified some code for RegisterAccountActivity