Fixed authentication properly