Bug fixing in authorization script.