Fix bug in update
add authentication check before authentication ,FIX bug
remove unused commas