Hi Amar
In this case, I am afraid of you you will have to write a system plugin to handle this requirement. You are talking about Joomla core login module or the login form on sign up page of Membership pro ?
Maybe you can try to look at this category on JED
extensions.joomla.org/extensions/access-...ccess/login-redirect
to see whether there are any plugins can be used to solve your requirement ?
Tuan