auth module rework + restructuring