This may help to get you started:
The following code will stop your users from logging in, and alert them to contact their administrator.
You could change it easily enough so that it sent an email to a nominated address instead, but I wouldn't do this as it would trigger every time they tried to log in to a project which could get quite spammy.
Function Template_CanLogin(DomainName, ProjectName, UserName)
On Error Resume Next
'call CanLogin(DomainName, ProjectName, UserName)
Template_CanLogin = Template_DefaultRes
If User.IsInGroup("Developer") or _
User.IsInGroup("Project Manager") or _
MsgBox "You have been prevented from logging in because you are assigned to an incorrect user group." &vbcrlf & "Please contact your project administrator to correct this", vbOKOnly + vbExclamation, "ACCESS DENIED"
Template_CanLogin = False