user controller and database connection