Helper function for verifying users