updated api urls and apikey
debug check
changed window to angular $window
fixed auth headers