Users refactoring and autorisation