Check for web socket support and move JS functions

Logs lack of web socket support