Adding logging, fixing shiro auth issue