reformat code, delete unneded classes
cleanup, extract BaseView and it's child BasePage, added home and edit view switching according to login state