Updated UI and added user authorization in database operations