Yes, the Messenger (PBUH) used to take Hasan (May God be pleased with him) tenderly into his arms and kiss his head for the sake of the luminous, blessed, Mahdi-like descendants who would spring from him, such as Shah Geylani, the Ghawth al-A'zam,4 who would be the inheritors of prophethood and would bear the sacred Shari'a of Muhammad. He saw with the eye of prophethood the sacred service and duty they would perform in the future, and approved and applauded them. He kissed Hasan's head as a sign of approval and encouragement.
4. Shaykh 'Abd al-Qadir GilanI (Geylam/JIIanl) d. 561/1165-6. The eponymous founder of the Qadiri Order. [Tr.]
Also, he embraced Husayn tenderly and accorded him importance on account of the illustrious Imams like Zayn al-'Abidin and Ja'far al-Sadiq, and the numerous Mahdi-like luminous persons, the true inheritors of prophethood, who would spring from his effulgent line, and for the sake of the religion of Islam and functions of prophethood.
Since with his heart with its knowledge of the Unseen, the Prophet Muhammad's (PBUH) luminous vision and future-penetrating eye observed from the Era of Bliss in this world the Assembly of the Resurrection on the side of post-eternity, and from the earth saw Paradise, and watched events which had occurred since the time of Adam and were concealed in the dark veils of the past, and even beheld the vision of the All-Glorious One, he surely saw the spiritual poles and the Imams who were to be the inheritors of prophethood, and the Mahdis, who would follow on in the lines of Hasan and Husayn. And for sure he would kiss their heads in the name of all of them. Yes, Shah Geylani has a large part in his kissing Hasan's head.