Update base.html

Fix the base.html javascript bugs