Community detection with nodal information: Likelihood and its variational approximation