Add redirect support when user is connected or not

This PR make a BC from config.

Allow redirect support when user is connected and when user is not connected to prevent circular redirection