added tests for making sure when localhost is used we allow it and set tls to false