Fixed SockJS initialisation. Updated tests