tzhang - add login and register page and add some page functions