Fixed authentication to work without error