“‘Whoever stands in prayer with the imaam until he (the imaam) concludes the prayer, it is recorded for him that he prayed the whole night.’…”
[Recorded by Ibn Abi Shaybah, Abu Dawud, at-Tirmithi (who authenticated it), an-Nasa’i, Ibn Majah, at-Tahawi (in Sharhu Ma`an il-Athar, Ibn Nasr, al-Faryabi, and al-Bayhaqi. Their isnad is authentic.]