refactored auth app into main app