Setup database and authentication