Update main.py

--added log entries for loggin on and off
--captures boxid and ip address etc...