Improved private group login snippet.