You can do it in Website Script
like this
$(function () {
if (location.pathname == "/login" && ! location.search && ! localStorage.getItem("session_last_route")){
const url = new URL(window.location);
url.searchParams.set('redirect-to', '/me');
window.history.pushState({}, '', url);
}
});
ex:
