move api script to bottom of page, defered loading otherwise