Hi Nidhi,
Contrary to what Rene is advising, you do not have to enable anonymous users to redirect users to the login page. In fact, the redirect should be handled automatically by the deeplink module.
By default, if a user is not logged in they will be redirected to “/login.html” which is the standard Mendix login page.
If you want to send users to a different address (for example if using SSO) then you need to set the constant Deeplink.LoginLocation
See this link for more details https://docs.mendix.com/appstore/modules/deep-link#2-7-constants-optional
I assume you have anonymous users enabled. If not, you need to allow anonymous users.
Then; in the deeplink config, allow anonymous users to use the deeplink. The microflow executed by the deeplink should have a check whether it is executed by an anonymous user $currentUser/IsAnonymous if true redirect to login, otherwise execute deeplink as normal.