Fix the issue with login redirect on search page having spaces in query