modify handlers to accept query string

It's more than one group, it's a page of groups. I'll shift the calculation of `next_cursor` though, good idea.