diff --git a/person_detection/app.py b/person_detection/app.py
index 240c450..b1e9b2d 100644
--- a/person_detection/app.py
+++ b/person_detection/app.py
@@ -5,21 +5,25 @@
 """
 from importlib import import_module
 import os
-from flask import Flask, render_template, Response
+import logging as log
+import sys
+import flask
 from argparse import ArgumentParser, SUPPRESS
 
 import config
 from person_detection import Camera
+import roc
 
 
-app = Flask(__name__)
+app = flask.Flask(__name__)
 
 
 @app.route('/')
 def index():
     global cameras
     """Video streaming home page."""
-    return render_template('index.html', devices=config.cameras)
+    log.info("{} - connected".format(flask.request.remote_addr))
+    return flask.render_template('index.html', devices=config.cameras)
 
 def gen(camera):
     """Video streaming generator function."""
@@ -32,8 +36,9 @@
 def video_feed(device):
     """Video streaming route. Put this in the src attribute of an img tag."""
     global args
-    camera = Camera(device, args)
-    return Response(gen(camera),
+    log.debug("{} - video feed {}".format(flask.request.remote_addr, device))
+    camera = Camera(device, flask.request.remote_addr, args)
+    return flask.Response(gen(camera),
                     mimetype='multipart/x-mixed-replace; boundary=frame')
 
 def name_to_port(name):
@@ -59,11 +64,10 @@
             default = 0.75,
             type = float)
     args.add_argument("--noroc",
-            action = 'store_false',
+            action = 'store_true',
             help = "No ROC")
     args.add_argument("--key",
             help = "ROC api key",
-            required = True,
             type = str)
     args.add_argument("--mbrlow",
             help = "Low range of MBR",
@@ -82,5 +86,9 @@
 
 
 if __name__ == '__main__':
+    log.basicConfig(format="[ %(levelname)s ] %(message)s", level=log.DEBUG, stream=sys.stdout)
+    log.debug("Starting person detection app")
     args = build_argparser().parse_args()
+    if not args.noroc:
+        roc.set_mbr(args.key, args.devicegroup, args.mbrlow)
     app.run(host='0.0.0.0', debug=True)
diff --git a/person_detection/base_camera.py b/person_detection/base_camera.py
index e97dca2..b8fa47c 100644
--- a/person_detection/base_camera.py
+++ b/person_detection/base_camera.py
@@ -39,6 +39,7 @@
             BaseCamera.process[self.device].start()
             # wait until frames are available
             _ = self.get_frame()
+            log.info("Start camera {} feed to {}".format(self.device, self.client))
 
     def get_frame(self):
         """Return the current camera frame."""
@@ -65,7 +66,7 @@
             BaseCamera.activity_counter.value += 1
             BaseCamera.lock.release()
             self.set_resolution_high()
-            if self.noroc is True:
+            if not self.noroc:
                 roc.set_mbr(self.key, self.devicegroup, self.mbrhigh)
             self.detected = True
             self.start_timer()
@@ -78,7 +79,7 @@
         if BaseCamera.activity_counter.value <= 0:
             BaseCamera.activity_counter.value = 0
             self.set_resolution_low()
-            if self.noroc is True:
+            if not self.noroc:
                 roc.set_mbr(self.key, self.devicegroup, self.mbrlow)
         BaseCamera.lock.release()
 
diff --git a/person_detection/person_detection.py b/person_detection/person_detection.py
index f7984af..86ebaa5 100644
--- a/person_detection/person_detection.py
+++ b/person_detection/person_detection.py
@@ -8,7 +8,6 @@
 from collections import namedtuple
 import logging as log
 import os
-import sys
 from argparse import ArgumentParser, SUPPRESS
 from imutils import build_montages
 
@@ -21,15 +20,13 @@
 class Camera(BaseCamera):
     Shape = namedtuple('Shape', ['n','c','h','w'])
 
-    def __init__(self, device, args):
-        log.basicConfig(format="[ %(levelname)s ] %(message)s", level=log.INFO, stream=sys.stdout)
-
+    def __init__(self, device, client, args):
         self.model_xml = args.model
         self.input = args.input
         self.prob_threshold = args.prob_threshold
         self.is_async_mode = True
         self.device = device
-
+        self.client = client
         super(Camera, self).__init__(device, args.key, args.mbrlow, args.mbrhigh, args.devicegroup, args.noroc)
 
     def __del__(self):
diff --git a/person_detection/templates/index.html b/person_detection/templates/index.html
index 0cb83e7..4acf6d7 100644
--- a/person_detection/templates/index.html
+++ b/person_detection/templates/index.html
@@ -12,7 +12,7 @@
         </div>
         <div class="row">
           {% for x, y in devices.items() %}
-          <div class="col-6">
+          <div class="col-12">
             <div class="card">
               <img src="{{ url_for('video_feed', device=x) }}" class="card-img-top" alt="...">
               <div class="card-body">
