Fix login url if search parameters are present in url