User list: Keep array of available groups. Should fix #873

@jancborchardt @MTRichards Can you please try this patch. It Works For Me, but during #1927 the js should have a general cleanup.