Fixing Login and Maps

Added Javascript for Index.php
Fixed result.php so heat map works for first page