fixed the not to loging redirect bug