Refactoring in permission and user