add: SSL support and improve daemon running (close #2)