Fix issue with wrong redirection even when logged