check group code is valid before allowing user to join group