Fixing auth method for simple api scripts