The discriminant controls automorphism groups of noncommutative algebras