fixing bugs in the register page