finished the register and main page