fix several bugs in account creation