We have a link on our site which will redirect users to the edit profile page when they are logged in.
We have same link for the anonymous users which will redirect the user to login page when it clicked.
We would like to redirect users to the edit profile page after login but if users use normal login link, after login, they are redirected to the homepage.
I would like to know how we can redirect users to edit profile page after login only if they clicked on the edit profile link.