All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
Some scholars are of the opinion that putting on shoes and covering the head before entering a toilet is desirable. They cited the narration reported by Imaam Al Bayhaqi as evidence that the Prophet "Used to put on his shoes and cover his head whenever he entered a toilet." This narration is weak.
It is also narrated from 'Aa'ishah that "The Prophet used to cover his head whenever he went to the toilet, and he used to cover his head when he had intercourse with his wife." This is also a weak narration.
Though, both narrations are weak acting according to them is allowed since they fall under the subject of virtues of some good deeds.
Imaam An-Nawawi said: 'All the scholars agreed that weak narrations are tolerated in performing good deeds.'
Covering the head before entering the toilet is also reported to be done by Abu Bakr . Imaam Al-Bayhaqi said, 'this practice is authentically reported to be done by him.'
Logically, it is better to put on shoes before entering toilet to protect the feet from any possible impurity. If it touches one's feet he may take it into pure places like a mosque, etc.
Talking at the time of relieving oneself is disliked for the narration reported from Abu Daawood, Ahmad, which is graded as "good" by Imaam An-Nawawi that the Prophet said: "When two persons go together for relieving themselves, uncovering their private parts, and talking together, Allaah, the Great and Majestic, becomes wrathful at this (action)."
Imaam An-Nawawi said: 'It is the consensus of scholars that talking while relieving oneself is disliked unless if there is a necessity for it.'
Allaah knows best.