bug #5192 :  select the user groups distinctively for the user panel so that no more than one time a given group is returned by the SQL query
fixing bug #5185
simplifying the way to check width of window