Restructuring AUTH module