change baseUrl to window.location.href to keep everything working, no matter what url