Implement baseURL for websockets, close #1642