thanks, I was able to figure out where the issue is. I was able to successfully implement it by doing configuration this function on the click event in the login page:
Default to(
Decode URI Component(
Get(
Get(
Parse URL(Current URL()),
"searchParams"
),
"redirect"
)
),
"/home"
)