changed User functions to add media to database and get media media from database as well as update database for balance whenever changed