Refactor main admin page, login and logout.