Added function updateAdmin in Javascript