checkAuth + db config