add a register page.

add a register page.and add some new functions to the original class
file.