get user groups from sql
cookie fixes. create default groups on registration.