code: function checkCollabAuthenticated(req, res, next) {
  		if (req.user) {
  			req.user.workspaceDir = options.workspaceDir + (req.user.workspace ? "/" + req.user.workspace : "");
  			next();
  		} else if (req.headers['authorization'] && checkCollabServerToken(req.headers['authorization'])){
  			next();
  		} else {
  			api.writeError(401, res, "Not authenticated");
  		}
  	}
docs: This method ensures that the websocket trying to retrieve and save content is authenticated.
  We allow two different authentication methods: JWT for the collab server and user token for users.