Changed 'window.location' to 'navigate.to', to avoid full page reloading