Update mention_alerts.php

Added permissions check of primary usergroup and some minor bug fixes.