added user preferences for oauth2 add on, added models for user, beacon, userpreference and segment, critical fix in trigger beacons