Fix leak, enable NRVO in Core::getUsername