Refactoring admin. Adding security.