refactoring + cleaning authentication + generic CRUD controller