Security fixs and usability improvements