Added some additional SQL logging, started working on SSL code