FINALLY WORKING!!!

- Changed port to 80
- Refactored log messages
- Closed scanner to get rid of silly warning
- Fixed a bug where server was returning device_id as time
- Fixed showstopper bug caused by failure to detect end of header
- Added nullcheck to safely handle no connection to database server