Login always redirects to search page