add logout required
fix redirect loop
add log out notice