admin page, admin checking, refactor template structure