Making server secure - with some debugs