Corrected auth file code and defined main function