Index: components/Alert.jsx
===================================================================
--- components/Alert.jsx	(revision 433e0c5f4289ea953d6d2c2d010c6bd651bd0c8f)
+++ components/Alert.jsx	(revision 55701f0270de2168597a7ca5d1a05ae6a66f516b)
@@ -7,9 +7,7 @@
 import axios from 'axios'
 
-import { setBlackjack, setStyle } from '../redux/reducers/styleSlice'
-import { setBlackjackGame } from '../redux/reducers/playerSlice'
+import { setStyle } from '../redux/reducers/styleSlice'
 
 const Alert = ({ onTop = false }) => {
-    const playerState = useSelector(state => state.player)
     const styleState = useSelector(state => state.style)
 
@@ -19,55 +17,17 @@
 
     function clicked() {
-        dispatch(setStyle({
-            ...styleState.style,
-            alert: {
-                ...styleState.style.alert,
-                show: false
-            }
-        }))
-
         if (styleState.style.alert.button.action === 'play_again') {
-            axios.get(`/api/blackjack?action=play_again&session_id=${localStorage.CAESSINO_SESSION_ID}`).then(res => {
-                if (res.data?.success && res.data?.game) {
-                    dispatch(setBlackjackGame({
-                        ...playerState.blackjackGame,
-                        status: res.data.game?.status,
-                        playerCards: res.data.game?.playerCards,
-                        dealerCards: res.data.game?.dealerCards,
-                        sideBetName: res.data.game?.sideBetName,
-                    }))
-
-                    dispatch(setBlackjack({
-                        ...styleState.blackjack,
-                        inputControls: {
-                            ...styleState.blackjack.inputControls,
-                            initialBet: {
-                                ...styleState.blackjack.inputControls.initialBet,
-                                chosenCredits: parseInt(playerState.player.credits/2),
-                            },
-                            sideBet: {
-                                ...styleState.blackjack.inputControls.sideBet,
-                                chosenCredits: parseInt(0),
-                            }
-                        },
-                        displays: {
-                            ...styleState.blackjack.displays,
-                            initialBet: true,
-                            hitStand: false,
-                        }
-                    }))
-                }
-            });
+            axios.get(`/api/blackjack?action=play_again&session_id=${localStorage.CAESSINO_SESSION_ID}`);
         }
         else if (styleState.style.alert.button.action === 'continue_from_side_bet') {
-            dispatch(setBlackjack({
-                ...styleState.blackjack,
-                inputControls: {
-                    ...styleState.blackjack.inputControls,
-                    sideBet: {
-                        ...styleState.blackjack.inputControls.sideBet,
-                        chosenCredits: parseInt(0),
-                    }
-                },
+            axios.get(`/api/blackjack?action=continue_from_side_bet&session_id=${localStorage.CAESSINO_SESSION_ID}`);
+        }
+        else {
+            dispatch(setStyle({
+                ...styleState.style,
+                alert: {
+                    ...styleState.style.alert,
+                    show: false
+                }
             }))
         }
Index: components/ManageCredits.jsx
===================================================================
--- components/ManageCredits.jsx	(revision 433e0c5f4289ea953d6d2c2d010c6bd651bd0c8f)
+++ components/ManageCredits.jsx	(revision 55701f0270de2168597a7ca5d1a05ae6a66f516b)
@@ -44,5 +44,5 @@
             } : action === 'withdraw' ? {
                 show: true,
-                text: `Withdrawed $${styleState.style.withdrawModalInputs.amount} successfully`,
+                text: `Withdrew $${Math.min(styleState.style.withdrawModalInputs.amount, playerState.player.credits)} successfully`,
                 status: 'success',
             } : {
Index: components/blackjack/BlackjackHeader.jsx
===================================================================
--- components/blackjack/BlackjackHeader.jsx	(revision 433e0c5f4289ea953d6d2c2d010c6bd651bd0c8f)
+++ components/blackjack/BlackjackHeader.jsx	(revision 55701f0270de2168597a7ca5d1a05ae6a66f516b)
@@ -30,15 +30,5 @@
         }));
 
-        dispatch(setBlackjack({
-            ...styleState.blackjack,
-            inputControls: {
-                ...styleState.blackjack.inputControls,
-                initialBet: {
-                    ...styleState.blackjack.inputControls.initialBet,
-                    chosenCredits: parseInt(playerState.player.credits/2),
-                }
-            }
-        }));
-
+        let interval = null;
         axios.get(`/api/blackjack?action=get_player_info_on_enter&session_id=${localStorage.CAESSINO_SESSION_ID}`).then(res => {
             if (res.data?.success) {
@@ -48,185 +38,81 @@
                     session_id: res.data?.session_id,
                     credits: res.data?.credits,
-                }));
-
-                dispatch(setBlackjackGame({
-                    ...playerState.blackjackGame,
-                    status: res.data?.status,
-                    playerCards: res.data?.playerCards,
-                    dealerCards: res.data?.dealerCards,
                 }))
 
-                dispatch(setStyle({
-                    ...styleState.style,
-                    displayLoadingScreen: false,
+                dispatch(setBlackjack({
+                    ...styleState.blackjack,
+                    inputControls: {
+                        ...styleState.blackjack.inputControls,
+                        initialBet: {
+                            ...styleState.blackjack.inputControls.initialBet,
+                            chosenCredits: parseInt(playerState.player.credits/2),
+                        },
+                        sideBet: {
+                            ...styleState.blackjack.inputControls.sideBet,
+                            chosenCredits: parseInt(playerState.player.credits/2),
+                        }
+                    },
                 }))
 
-                if (parseInt(res.data?.status.toString().substr(1, 1)) == 5) {
-                    dispatch(setBlackjack({
-                        ...styleState.blackjack,
-                        inputControls: {
-                            ...styleState.blackjack.inputControls,
-                            initialBet: {
-                                ...styleState.blackjack.inputControls.initialBet,
-                                chosenCredits: parseInt(res.data?.initialBet),
-                            },
-                            sideBet: {
-                                ...styleState.blackjack.inputControls.sideBet,
-                                chosenCredits: 0,
+                if (interval !== null) clearInterval(interval);
+                
+                interval = setInterval(() => {
+                    axios.get(`/api/blackjack?action=update_state&session_id=${localStorage.CAESSINO_SESSION_ID}`).then(newRes => {
+                        if (newRes.data?.success) {
+                            dispatch(setBlackjackGame(newRes.data?.blackjackGame))
+
+                            if (newRes.data?.blackjackGame?.credits !== playerState.player.credits && parseInt(newRes.data?.blackjackGame?.credits) > 0) {
+                                dispatch(setPlayer({
+                                    ...playerState.player,
+                                    displayName: res.data?.displayName,
+                                    session_id: res.data?.session_id,
+                                    credits: newRes.data?.blackjackGame?.credits,
+                                }))
                             }
-                        },
-                        displays: {
-                            ...styleState.blackjack.displays,
-                            initialBet: false,
-                            hitStand: true,
+
+                            dispatch(setStyle({
+                                ...styleState.style,
+                                displayLoadingScreen: false,
+                                notification: {
+                                    ...styleState.style.notification,
+                                    show: false,
+                                },
+                                lostConnectionInfo: {
+                                    show: false,
+                                    message: ''
+                                },
+                                alert: (newRes.data?.blackjackGame?.status?.includes('_5_') && !newRes.data?.blackjackGame?.betOutcomeMessageShown) ? {
+                                    show: true,
+                                    title: newRes.data?.blackjackGame?.messageTitle,
+                                    subtitle: newRes.data?.blackjackGame?.messageDescription,
+                                    button: {
+                                        text: 'Play Again',
+                                        action: 'play_again',
+                                    }
+                                } : (newRes.data?.blackjackGame?.status?.includes('_4_') && !newRes.data?.blackjackGame?.sideBetOutcomeMessageShown && newRes.data?.blackjackGame?.sideBet > 0) ? {
+                                    show: true,
+                                    title: newRes.data?.blackjackGame?.messageTitle,
+                                    subtitle: newRes.data?.blackjackGame?.messageDescription,
+                                    button: {
+                                        text: 'Continue',
+                                        action: 'continue_from_side_bet',
+                                    }
+                                } : {
+                                    ...styleState.style.alert,
+                                    show: false,
+                                },
+                            }))
                         }
-                    }))
-
-                    if (res.data?.outcome === 'player_busted') {
+                    }).catch(error => {
                         dispatch(setStyle({
                             ...styleState.style,
-                            alert: {
+                            displayLoadingScreen: false,
+                            lostConnectionInfo: {
                                 show: true,
-                                title: 'You busted!',
-                                subtitle: `You lost $${-1*res.data?.earnings}`,
-                                button: {
-                                    text: 'Play again',
-                                    action: 'play_again',
-                                }
+                                message: 'Game will resume upon reconnection to the server.'
                             }
                         }))
-                    }
-                    else if (res.data?.outcome === 'dealer_busted') {
-                        dispatch(setStyle({
-                            ...styleState.style,
-                            alert: {
-                                show: true,
-                                title: 'Dealer busted!',
-                                subtitle: `You won $${res.data?.earnings}`,
-                                button: {
-                                    text: 'Play again',
-                                    action: 'play_again',
-                                }
-                            }
-                        }))
-                    }
-                    else if (res.data?.outcome === 'player_won') {
-                        dispatch(setStyle({
-                            ...styleState.style,
-                            alert: {
-                                show: true,
-                                title: 'You won!',
-                                subtitle: `You won $${res.data?.earnings}`,
-                                button: {
-                                    text: 'Play again',
-                                    action: 'play_again',
-                                }
-                            }
-                        }))
-                    }
-                    else if (res.data?.outcome === 'player_lost') {
-                        dispatch(setStyle({
-                            ...styleState.style,
-                            alert: {
-                                show: true,
-                                title: 'You lost!',
-                                subtitle: `You lost $${-1*res.data?.earnings}`,
-                                button: {
-                                    text: 'Play again',
-                                    action: 'play_again',
-                                }
-                            }
-                        }))
-                    }
-                    else if (res.data?.outcome === 'draw') {
-                        dispatch(setStyle({
-                            ...styleState.style,
-                            alert: {
-                                show: true,
-                                title: 'Draw!',
-                                subtitle: `You got your $${res.data?.earnings} back`,
-                                button: {
-                                    text: 'Play again',
-                                    action: 'play_again',
-                                }
-                            }
-                        }))
-                    }
-                }
-
-                if (parseInt(res.data?.status.toString().substr(1, 1)) == 4) {
-                    dispatch(setBlackjack({
-                        ...styleState.blackjack,
-                        inputControls: {
-                            ...styleState.blackjack.inputControls,
-                            initialBet: {
-                                ...styleState.blackjack.inputControls.initialBet,
-                                chosenCredits: parseInt(res.data?.initialBet),
-                            },
-                            sideBet: {
-                                ...styleState.blackjack.inputControls.sideBet,
-                                chosenCredits: 0,
-                            }
-                        },
-                        displays: {
-                            ...styleState.blackjack.displays,
-                            initialBet: false,
-                            hitStand: true,
-                        }
-                    }))
-                }
-
-                if (parseInt(res.data?.status.toString().substr(1, 1)) == 3) {
-                    dispatch(setBlackjack({
-                        ...styleState.blackjack,
-                        inputControls: {
-                            ...styleState.blackjack.inputControls,
-                            initialBet: {
-                                ...styleState.blackjack.inputControls.initialBet,
-                                chosenCredits: parseInt(res.data?.initialBet),
-                            },
-                            sideBet: {
-                                ...styleState.blackjack.inputControls.sideBet,
-                                chosenCredits: parseInt(res.data?.sideBet),
-                            }
-                        },
-                        displays: {
-                            ...styleState.blackjack.displays,
-                            initialBet: false,
-                            hitStand: true,
-                        }
-                    }))
-                }
-
-                if (parseInt(res.data?.status.toString().substr(1, 1)) == 2) {
-                    dispatch(setBlackjack({
-                        ...styleState.blackjack,
-                        inputControls: {
-                            ...styleState.blackjack.inputControls,
-                            initialBet: {
-                                ...styleState.blackjack.inputControls.initialBet,
-                                chosenCredits: parseInt(res.data?.initialBet),
-                            }
-                        },
-                        displays: {
-                            ...styleState.blackjack.displays,
-                            initialBet: false,
-                            sideBet: true,
-                        }
-                    }))
-                }
-
-                if (parseInt(res.data?.status.toString().substr(1, 1)) == 1) {
-                    dispatch(setBlackjack({
-                        ...styleState.blackjack,
-                        inputControls: {
-                            ...styleState.blackjack.inputControls,
-                            initialBet: {
-                                ...styleState.blackjack.inputControls.initialBet,
-                                chosenCredits: parseInt(res.data?.credits/2),
-                            }
-                        },
-                    }))
-                }
+                    });
+                }, 1000);
             }
             else {
@@ -244,4 +130,8 @@
             }
         });
+
+        return () => {
+            if (interval !== null) clearInterval(interval);
+        };
     }, []);
 
Index: components/blackjack/DisplayBet.jsx
===================================================================
--- components/blackjack/DisplayBet.jsx	(revision 433e0c5f4289ea953d6d2c2d010c6bd651bd0c8f)
+++ components/blackjack/DisplayBet.jsx	(revision 55701f0270de2168597a7ca5d1a05ae6a66f516b)
@@ -6,11 +6,10 @@
   const playerState = useSelector(state => state.player);
   const styleState = useSelector(state => state.style);
-
   let display = parseInt(playerState.blackjackGame.status.substr(1, 1)) >= 2 ? 'block' : 'none';
-  let displaySideBet = ( parseInt(playerState.blackjackGame.status.substr(1, 1)) >= 3 && parseInt(styleState.blackjack.inputControls.sideBet.chosenCredits) > 0 ) ? 'block' : 'none';
+  let displaySideBet = ( parseInt(playerState.blackjackGame.status.substr(1, 1)) >= 3 && parseInt(playerState.blackjackGame.sideBet) > 0 && !playerState.blackjackGame.sideBetOutcomeMessageShown ) ? 'block' : 'none';
 
   return (
     <div className="blackjackDisplayBet" style={{display: display}}>
-      <span>${styleState.blackjack.inputControls.initialBet.chosenCredits}{displaySideBet === 'block' ? ` + $${styleState.blackjack.inputControls.sideBet.chosenCredits}` : ''}</span>
+      <span>${playerState.blackjackGame.initialBet}{displaySideBet === 'block' ? ` + $${playerState.blackjackGame.sideBet}` : ''}</span>
     </div>
   )
Index: components/blackjack/PlayButtons.jsx
===================================================================
--- components/blackjack/PlayButtons.jsx	(revision 433e0c5f4289ea953d6d2c2d010c6bd651bd0c8f)
+++ components/blackjack/PlayButtons.jsx	(revision 55701f0270de2168597a7ca5d1a05ae6a66f516b)
@@ -44,26 +44,5 @@
 
     function placeInitialBetClicked() {
-        axios.get(`/api/blackjack?action=make_initial_bet&session_id=${localStorage.CAESSINO_SESSION_ID}&bet=${styleState.blackjack.inputControls.initialBet.chosenCredits}`).then(res => {
-            if (res.data?.success) {
-                dispatch(setBlackjackGame({
-                    ...playerState.blackjackGame,
-                    status: res.data?.status,
-                }))
-
-                dispatch(setPlayer({
-                    ...playerState.player,
-                    credits: res.data?.credits,
-                }))
-
-                dispatch(setBlackjack({
-                    ...styleState.blackjack,
-                    displays: {
-                        ...styleState.blackjack.displays,
-                        initialBet: false,
-                        sideBet: true,
-                    }
-                }))
-            }
-        });
+        axios.get(`/api/blackjack?action=make_initial_bet&session_id=${localStorage.CAESSINO_SESSION_ID}&bet=${styleState.blackjack.inputControls.initialBet.chosenCredits}`);
     }
 
@@ -124,11 +103,7 @@
         const texts = splitTexts(e.target.innerHTML);
 
-        dispatch(setBlackjackGame({
-            ...playerState.blackjackGame,
-            sideBetName: sideBetName
-        }))
-
-        dispatch(setBlackjack({
-            ...styleState.blackjack,
+        dispatch(setBlackjack({
+            ...styleState.blackjack,
+            sideBetName: sideBetName,
             displays: {
                 ...styleState.blackjack.displays,
@@ -145,16 +120,6 @@
 
     function placeSideBetClicked() {
-        axios.get(`/api/blackjack?action=make_side_bet&session_id=${localStorage.CAESSINO_SESSION_ID}&bet=${styleState.blackjack.inputControls.sideBet.chosenCredits}&betName=${playerState.blackjackGame.sideBetName}`).then(res => {
+        axios.get(`/api/blackjack?action=make_side_bet&session_id=${localStorage.CAESSINO_SESSION_ID}&bet=${styleState.blackjack.inputControls.sideBet.chosenCredits}&betName=${styleState.blackjack.sideBetName}`).then(res => {
             if (res.data?.success) {
-                dispatch(setBlackjackGame({
-                    ...playerState.blackjackGame,
-                    status: res.data?.status,
-                }))
-
-                dispatch(setPlayer({
-                    ...playerState.player,
-                    credits: res.data?.credits,
-                }))
-
                 dispatch(setBlackjack({
                     ...styleState.blackjack,
@@ -162,6 +127,4 @@
                         ...styleState.blackjack.displays,
                         sideBetsChooseCreditsModal: false,
-                        sideBet: false,
-                        hitStand: true,
                     }
                 }))
@@ -181,13 +144,4 @@
                         sideBetsModal: false,
                         sideBetsChooseCreditsModal: false,
-                        sideBet: false,
-                        hitStand: true,
-                    },
-                    inputControls: {
-                        ...styleState.blackjack.inputControls,
-                        sideBet: {
-                            ...styleState.blackjack.inputControls.sideBet,
-                            chosenCredits: 0,
-                        }
                     },
                 }))
@@ -199,50 +153,5 @@
 
     function getCards() {
-        axios.get(`/api/blackjack?action=get_initial_cards&session_id=${localStorage.CAESSINO_SESSION_ID}`).then(res => {
-            if (res.data?.success) {
-                dispatch(setBlackjackGame({
-                    ...playerState.blackjackGame,
-                    status: res.data?.status,
-                    playerCards: res.data?.playerCards,
-                    dealerCards: res.data?.dealerCards,
-                }))
-
-                if (res.data?.sideBetOutcome !== '') {
-                    if (res.data.sideBetOutcome === 'side_bet_won') {
-                        dispatch(setBlackjackGame({
-                            ...playerState.blackjackGame,
-                            credits: res.data?.credits,
-                        }))
-                        
-                        dispatch(setStyle({
-                            ...styleState.style,
-                            alert: {
-                                show: true,
-                                title: 'You won the side bet!',
-                                subtitle: `You won $${res.data?.sideBetEarnings}`,
-                                button: {
-                                    text: 'Continue',
-                                    action: 'continue_from_side_bet',
-                                }
-                            }
-                        }))
-                    }
-                    else if (res.data.sideBetOutcome === 'side_bet_lost') {
-                        dispatch(setStyle({
-                            ...styleState.style,
-                            alert: {
-                                show: true,
-                                title: 'You lost the side bet!',
-                                subtitle: `You lost $${-1*res.data?.sideBetEarnings}`,
-                                button: {
-                                    text: 'Continue',
-                                    action: 'continue_from_side_bet',
-                                }
-                            }
-                        }))
-                    }
-                }
-            }
-        });
+        axios.get(`/api/blackjack?action=get_initial_cards&session_id=${localStorage.CAESSINO_SESSION_ID}`);
     }
 
@@ -282,83 +191,10 @@
 
     function standClicked() {
-        axios.get(`/api/blackjack?action=stand&session_id=${localStorage.CAESSINO_SESSION_ID}`).then(res => {
-            if (res.data?.success) {
-                dispatch(setBlackjackGame({
-                    ...playerState.blackjackGame,
-                    status: res.data?.status,
-                    playerCards: res.data?.playerCards,
-                    dealerCards: res.data?.dealerCards,
-                }))
-
-                if (res.data?.status.toString().substr(1, 1) === '5') { // game_over
-                    dispatch(setPlayer({
-                        ...playerState.player,
-                        credits: res.data?.credits,
-                    }))
-                    
-                    if (res.data?.outcome === 'dealer_busted') {
-                        dispatch(setStyle({
-                            ...styleState.style,
-                            alert: {
-                                show: true,
-                                title: 'Dealer busted!',
-                                subtitle: `You won $${res.data?.earnings}`,
-                                button: {
-                                    text: 'Play again',
-                                    action: 'play_again',
-                                }
-                            }
-                        }))
-                    }
-                    else if (res.data?.outcome === 'player_won') {
-                        dispatch(setStyle({
-                            ...styleState.style,
-                            alert: {
-                                show: true,
-                                title: 'You won!',
-                                subtitle: `You won $${res.data?.earnings}`,
-                                button: {
-                                    text: 'Play again',
-                                    action: 'play_again',
-                                }
-                            }
-                        }))
-                    }
-                    else if (res.data?.outcome === 'player_lost') {
-                        dispatch(setStyle({
-                            ...styleState.style,
-                            alert: {
-                                show: true,
-                                title: 'You lost!',
-                                subtitle: `You lost $${-1*res.data?.earnings}`,
-                                button: {
-                                    text: 'Play again',
-                                    action: 'play_again',
-                                }
-                            }
-                        }))
-                    }
-                    else if (res.data?.outcome === 'draw') {
-                        dispatch(setStyle({
-                            ...styleState.style,
-                            alert: {
-                                show: true,
-                                title: 'Draw!',
-                                subtitle: `You got your $${res.data?.earnings} back`,
-                                button: {
-                                    text: 'Play again',
-                                    action: 'play_again',
-                                }
-                            }
-                        }))
-                    }
-                }
-            }
-        });
+        axios.get(`/api/blackjack?action=stand&session_id=${localStorage.CAESSINO_SESSION_ID}`);
     }
 
     return (
         <div className="blackjackButtons">
-            <div className="blackjackInitialBet" style={{display: styleState.blackjack.displays.initialBet ? 'flex' : 'none'}}>
+            <div className="blackjackInitialBet" style={{display: playerState.blackjackGame.status.includes('_1_') ? 'flex' : 'none'}}>
                 <div>
                     <input type="range" className="primarySlider" min={0} max={playerState.player.credits} step={1} value={styleState.blackjack.inputControls.initialBet.chosenCredits} onChange={(e) => chooseCoins(e)} />
@@ -369,9 +205,9 @@
                 <button className="primaryButton" onClick={() => placeInitialBetClicked()}>Place Initial Bet <GiTwoCoins style={{marginTop: '3px', marginBottom: '-3px'}} /></button>
             </div>
-            <div className="blackjackSideBet" style={{display: styleState.blackjack.displays.sideBet ? 'flex' : 'none'}}>
+            <div className="blackjackSideBet" style={{display: playerState.blackjackGame.status.includes('_2_') ? 'flex' : 'none'}}>
                 <button className="primaryButton" onClick={() => placeSideBetsClicked()}>Place Side Bets <GiTwoCoins style={{marginTop: '3px', marginBottom: '-3px'}} /></button>
                 <button className="primaryButton" onClick={() => skipSideBetsClicked()}>Skip <GiReturnArrow style={{marginTop: '3px', marginBottom: '-3px', transform: 'rotateZ(-15deg)'}} /></button>
             </div>
-            <div className="blackjackHitStand" style={{display: styleState.blackjack.displays.hitStand ? 'flex' : 'none'}}>
+            <div className="blackjackHitStand" style={{display: parseInt(playerState.blackjackGame.status.toString().substr(1, 1)) >= 3 ? 'flex' : 'none'}}>
                 <button className="primaryButton" onClick={() => hitClicked()}>Hit <GiCardDraw style={{marginTop: '3px', marginBottom: '-3px'}} /></button>
                 <button className="primaryButton" onClick={() => standClicked()}>Stand <AiFillCheckCircle style={{marginTop: '3px', marginBottom: '-3px'}} /></button>
Index: components/poker/PokerHeader.jsx
===================================================================
--- components/poker/PokerHeader.jsx	(revision 433e0c5f4289ea953d6d2c2d010c6bd651bd0c8f)
+++ components/poker/PokerHeader.jsx	(revision 55701f0270de2168597a7ca5d1a05ae6a66f516b)
@@ -89,4 +89,8 @@
             }
         });
+
+        return () => {
+            if (interval !== null) clearInterval(interval);
+        };
     }, [])
 
Index: components/roulette/RouletteHeader.jsx
===================================================================
--- components/roulette/RouletteHeader.jsx	(revision 433e0c5f4289ea953d6d2c2d010c6bd651bd0c8f)
+++ components/roulette/RouletteHeader.jsx	(revision 55701f0270de2168597a7ca5d1a05ae6a66f516b)
@@ -138,4 +138,8 @@
             }
         });
+
+        return () => {
+            if (interval !== null) clearInterval(interval);
+        };
     }, []);
 
Index: pages/api/blackjack/gameStates.js
===================================================================
--- pages/api/blackjack/gameStates.js	(revision 433e0c5f4289ea953d6d2c2d010c6bd651bd0c8f)
+++ pages/api/blackjack/gameStates.js	(revision 55701f0270de2168597a7ca5d1a05ae6a66f516b)
@@ -1,2 +1,4 @@
+import { rooms } from "../postgre";
+
 const singleDeck = ["SA", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "SX", "SJ", "SQ", "SK",
                     "HA", "H2", "H3", "H4", "H5", "H6", "H7", "H8", "H9", "HX", "HJ", "HQ", "HK",
@@ -11,4 +13,5 @@
  */
 export let game = {
+  credits: -1,
   deck: [...deck],
   status: '_1_room_created',      // statuses: _1_room_created, _2_made_initial_bet, _3_made_side_bet, _4_cards_on_the_table, _5_game_over
@@ -23,4 +26,31 @@
   sideBetOutcome: '',
   sideBetEarnings: 0,
+  messageTitle: '',
+  messageDescription: '',
+  betOutcomeMessageShown: true,
+  sideBetOutcomeMessageShown: true,
+}
+
+export function getGame(session_id) {
+  if (rooms[session_id] !== undefined) {
+    return {
+      success: true,
+      game: rooms[session_id],
+    }
+  }
+
+  return {
+      success: false,
+      game: {...game, playerCards: [...game.playerCards], dealerCards: [...game.dealerCards]},
+  };
+}
+
+export function getRestrictedGameObject(session_id) {
+  const { success, game } = getGame(session_id)
+
+  return {
+    ...game,
+    dealerCards: game.status.includes('_5_') ? game.dealerCards : game.dealerCards.length > 0 ? [game.dealerCards[0]].concat(['back']) : [],
+  }
 }
 
Index: pages/api/blackjack/index.js
===================================================================
--- pages/api/blackjack/index.js	(revision 433e0c5f4289ea953d6d2c2d010c6bd651bd0c8f)
+++ pages/api/blackjack/index.js	(revision 55701f0270de2168597a7ca5d1a05ae6a66f516b)
@@ -3,5 +3,5 @@
 require('dotenv').config();
 
-import { game, drawASingleCard, getInitialCards, calculateHandValue } from './gameStates';
+import { game, drawASingleCard, getInitialCards, calculateHandValue, getGame, getRestrictedGameObject } from './gameStates';
 import { calculateEarnings, calculateSideBetEarnings } from './calculateEarnings';
 
@@ -39,17 +39,28 @@
         rooms[session_id] = {...game, playerCards: [...game.playerCards], dealerCards: [...game.dealerCards]};
 
-        res.json({
-          success: true,
-          game: rooms[session_id],
-        })
+        rooms[session_id].betOutcomeMessageShown = true;
 
         update_rooms_to_database();
-
-        return ;
-      }
-
-      res.json({
-        success: false,
-      })
+      }
+
+      res.end();
+    }
+
+    /**
+     * /---------------------- GET ----------------------/
+     * If game status is _4_cards_on_the_table, turn off the alert for side bet outcome
+     * @action continue_from_side_bet
+     * @param session_id
+     */
+     if (req.query.action === 'continue_from_side_bet' && req.query?.session_id) {
+      const session_id = req.query.session_id;
+
+      if (rooms[session_id] !== undefined && rooms[session_id].status.substr(1, 1) === '4') {
+        rooms[session_id].sideBetOutcomeMessageShown = true;
+
+        update_rooms_to_database();
+      }
+
+      res.end();
     }
 
@@ -88,8 +99,28 @@
         room.earnings = calculateEarnings(room);
 
+        if (room.outcome === 'draw') {
+          room.messageTitle = 'Draw!';
+          room.messageDescription = `You got your $${room.earnings} back`
+        }
+        else if (room.outcome === 'player_won') {
+          room.messageTitle = 'You won!';
+          room.messageDescription = `You won $${room.earnings}`
+        }
+        else if (room.outcome === 'dealer_busted') {
+          room.messageTitle = `Dealer ${room.dealerName} busted!`;
+          room.messageDescription = `You won $${room.earnings}`
+        }
+        else if (room.outcome === 'player_lost') {
+          room.messageTitle = 'You lost!';
+          room.messageDescription = `You lost $${-1*room.earnings}`
+        }
+        room.betOutcomeMessageShown = false;
+
         rooms[session_id] = room;
 
         axios.get(`${process.env.HOME_URL}/api/postgre/?action=add_credits&session_id=${session_id}&credits=${room.earnings}&game=blackjack&outcome=${room.outcome}`).then(postgreRes => {
           if (postgreRes.data?.success) {
+            rooms[session_id].credits = postgreRes.data?.credits;
+
             res.json({
               success: true,
@@ -139,6 +170,11 @@
           room.status = '_5_game_over';
           room.outcome = 'player_busted';
-
+          
           room.earnings = calculateEarnings(room);
+
+          room.messageTitle = 'You busted!';
+          room.messageDescription = `You lost $${-1*room.earnings}`
+          
+          room.betOutcomeMessageShown = false;
 
           rooms[session_id] = room;
@@ -146,4 +182,6 @@
           axios.get(`${process.env.HOME_URL}/api/postgre/?action=add_credits&session_id=${session_id}&credits=${room.earnings}&game=blackjack&outcome=${room.outcome}`).then(postgreRes => {
             if (postgreRes.data?.success) {
+              rooms[session_id].credits = postgreRes.data?.credits;
+
               res.json({
                 success: true,
@@ -207,46 +245,30 @@
           room.sideBetOutcome = room.sideBetEarnings > 0 ? 'side_bet_won' : 'side_bet_lost';
 
+          if (room.sideBetOutcome === 'side_bet_won') {
+            room.messageTitle = `You won the side bet!`;
+            room.messageDescription = `You won $${room.sideBetEarnings}`
+          }
+          else if (room.sideBetOutcome === 'side_bet_lost') {
+            room.messageTitle = `You lost the side bet!`;
+            room.messageDescription = `You lost $${-1*room.sideBetEarnings}`
+          }
+
+          room.sideBetOutcomeMessageShown = false;
+          
           rooms[session_id] = room;
+
+          update_rooms_to_database();
 
           axios.get(`${process.env.HOME_URL}/api/postgre/?action=add_credits&session_id=${session_id}&credits=${room.sideBetEarnings}`).then(postgreRes => {
             if (postgreRes.data?.success) {
-              res.json({
-                success: true,
-                status: rooms[session_id].status,
-                playerCards: rooms[session_id].playerCards,
-                dealerCards: Array(rooms[session_id].dealerCards[0]).concat('back'),
-                sideBetOutcome: rooms[session_id].sideBetOutcome,
-                sideBetEarnings: rooms[session_id].sideBetEarnings,
-                credits: postgreRes.data?.credits,
-              })
-            
+              rooms[session_id].credits = postgreRes.data?.credits;
+
               update_rooms_to_database();
             }
-            else {
-              res.json({
-                success: false,
-              })
-            }
           });
         }
-        else {
-          res.json({
-            success: true,
-            status: rooms[session_id].status,
-            playerCards: rooms[session_id].playerCards,
-            dealerCards: Array(rooms[session_id].dealerCards[0]).concat('back'),
-            sideBetOutcome: rooms[session_id].sideBetOutcome,
-            sideBetEarnings: rooms[session_id].sideBetEarnings,
-          })
-            
-          update_rooms_to_database();
-        }
-
-        return ;
-      }
-
-      res.json({
-        success: false,
-      })
+      }
+
+      res.end();
     }
 
@@ -259,5 +281,5 @@
      * @param betName
      */
-     if (req.query.action === 'make_side_bet' && req.query?.session_id && req.query?.bet && req.query?.betName) {
+    if (req.query.action === 'make_side_bet' && req.query?.session_id && req.query?.bet && req.query?.betName) {
       const session_id = req.query.session_id;
 
@@ -269,4 +291,6 @@
         axios.get(`${process.env.HOME_URL}/api/postgre?action=take_credits&session_id=${session_id}&credits=${req.query.bet}`).then(postgreRes => {
           if (postgreRes.data?.success) {
+            rooms[session_id].credits = postgreRes.data?.credits;
+
             const room = rooms[session_id];
 
@@ -279,18 +303,13 @@
             res.json({
               success: true,
-              status: rooms[session_id].status,
-              credits: postgreRes.data?.credits,
             })
             
             update_rooms_to_database();
           }
+          else {
+            res.end();
+          }
         });
-        
-        return ;
-      }
-
-      res.json({
-        success: false,
-      })
+      }
     }
     
@@ -310,4 +329,6 @@
         axios.get(`${process.env.HOME_URL}/api/postgre?action=take_credits&session_id=${session_id}&credits=${req.query.bet}`).then(postgreRes => {
           if (postgreRes.data?.success) {
+            rooms[session_id].credits = postgreRes.data?.credits;
+
             const room = rooms[session_id];
 
@@ -316,26 +337,11 @@
 
             rooms[session_id] = room;
-
-            res.json({
-              success: true,
-              status: rooms[session_id].status,
-              credits: postgreRes.data?.credits,
-            })
             
             update_rooms_to_database();
           }
-          else {
-            res.json({
-              success: false,
-            })
-          }
         });
-
-        return ;
-      }
-
-      res.json({
-        success: false,
-      })
+      }
+
+      res.end();
     }
 
@@ -358,4 +364,21 @@
             
       update_rooms_to_database();
+    }
+
+    /**
+     * /---------------------- GET ----------------------/
+     * Updates the state periodically
+     * @action update_state
+     * @param session_id
+     */
+     if (req.query.action === 'update_state' && req.query?.session_id) {
+      const session_id = req.query.session_id;
+
+      const { success, game } = getGame(session_id);
+
+      res.json({
+          success: true,
+          blackjackGame: getRestrictedGameObject(session_id),
+      })
     }
 
Index: pages/api/poker/index.js
===================================================================
--- pages/api/poker/index.js	(revision 433e0c5f4289ea953d6d2c2d010c6bd651bd0c8f)
+++ pages/api/poker/index.js	(revision 55701f0270de2168597a7ca5d1a05ae6a66f516b)
@@ -5,7 +5,7 @@
 import { createTable, getRestrictedTablesArray, getRestrictedTableArray, getTable, getTableAndPlayer } from './gameStates';
 
-import { drawASingleCard, setNextPlayerIdx, progressRoundIfNeeded, progressRoundTillTheEnd } from './tableSpecific'
-
-import { tables, cleanTables, update_tables_to_database, load_tables_from_database } from '../postgre/index'
+import { drawASingleCard, setNextPlayerIdx, progressRoundIfNeeded } from './tableSpecific'
+
+import { update_tables_to_database } from '../postgre/index'
 
 /**
Index: pages/api/postgre/index.js
===================================================================
--- pages/api/postgre/index.js	(revision 433e0c5f4289ea953d6d2c2d010c6bd651bd0c8f)
+++ pages/api/postgre/index.js	(revision 55701f0270de2168597a7ca5d1a05ae6a66f516b)
@@ -324,4 +324,11 @@
         return ;
       }
+      if (parseInt(body?.data?.amount) > 5000) {
+        res.json({
+          success: false,
+          message: 'Failed to deposit. Insufficient credit on card.',
+        });
+        return ;
+      }
 
       let session = sessions.find(session => session.id === body?.session_id)
@@ -338,4 +345,6 @@
               credits: session.credits
             })
+            
+            update_sessions_to_database();
           });
         }
@@ -415,4 +424,6 @@
               credits: session.credits
             })
+
+            update_sessions_to_database();
           });
         }
@@ -762,3 +773,2 @@
 }
 load_rooms_from_database();
-  
Index: pages/api/roulette/gameStates.js
===================================================================
--- pages/api/roulette/gameStates.js	(revision 433e0c5f4289ea953d6d2c2d010c6bd651bd0c8f)
+++ pages/api/roulette/gameStates.js	(revision 55701f0270de2168597a7ca5d1a05ae6a66f516b)
@@ -86,4 +86,7 @@
         })
     }
+    else {
+        game.players[game.players.map(e=>e.session_id).indexOf(session_id)].credits = -1;
+    }
 }
 
Index: redux/reducers/playerSlice.js
===================================================================
--- redux/reducers/playerSlice.js	(revision 433e0c5f4289ea953d6d2c2d010c6bd651bd0c8f)
+++ redux/reducers/playerSlice.js	(revision 55701f0270de2168597a7ca5d1a05ae6a66f516b)
@@ -14,4 +14,6 @@
         dealerCards: [],
         sideBetName: '',
+        betAmount: 0,
+        sideBetAmount: 0,
     },
     rouletteGame: {
Index: redux/reducers/styleSlice.js
===================================================================
--- redux/reducers/styleSlice.js	(revision 433e0c5f4289ea953d6d2c2d010c6bd651bd0c8f)
+++ redux/reducers/styleSlice.js	(revision 55701f0270de2168597a7ca5d1a05ae6a66f516b)
@@ -104,4 +104,5 @@
             }
         },
+        sideBetName: '',
         texts: {
             sideBetsChooseCreditsText: '',
