implement toggle-admin feature and fix test