* Add default Authentication Switch. * adjust the code accroding to reviews * #1. Remove redudant logic. #2, Fix a bug in "Edit" panel. * Remove unused logic * Fix local authentication files are not flushed. * refactor according to review.