Rewrite query for version 9.2
The only issue seems to be the FILTER clause. You can  rewrite:

COUNT(*) FILTER ( WHERE tsrange(login_start, login_end, '[]') 
                  &amp;&amp; tsrange(time, time + '30 minutes'::interval, '[]')
                )


as:

COUNT(CASE WHEN tsrange(login_start, login_end, '[]') 
                &amp;&amp; tsrange(time, time + '30 minutes'::interval, '[]')
           THEN 1 END
     )


I would also use inclusive-exclusive intervals: [). Otherwise some rows will be counted twice.