Updated database structure
Prevent privilege escalation in group management

Thanks, daksh @ HackerOne!