added usercontroller and db update logic