Added auth and some logging goodness