fixed login to redirect to search when successful