connection to db established and creates accounts