Correct URL manipulation after login and modal close