creating application and implementing authentication