Fixed errors with local authentication