Adding a few more checks before allowing a websocket