setup db and security