Extracted a class with group membership and user password checks.

These can be used for a custom authentication check.