refcatoring sockjs