Your kid might be developing gastroenteritis- infection of the gut- mostly viral in this age group.
He might have had abdominal pain
due to which he cried excessively.
Visit your doctor and get him examined.
He might need medications like Acetaminophen
in a dose of 15 mg/kg/dose repeated every 6 hours for his fever
If he cries gain out of abdominal cramps, he might need medications like Cyclopam
Just be sure he drinks well and his activity is okay.
For his loose stools- you might need to give him rice based food, mashed potato, banana and lot of curd.
Do not self medicate. Do visit your Pediatrician
Wish your son a speedy recovery.