update: improved anthentication and DB connection