Client middleware improved to prevent redirection for exluded pattern in case of user already logged in
settings document added