Add option to disable redirect when connected

Update docs

typo

Tabs to spaces

Increase test coverage

Fix indentation