Add logic for redirects on enter