Add heroku password to heroku test
Fix JavaScript SSL upgrade logic

I had accepted the pull request way back without proper test coverage.
I've added test coverage & fixed this long-standing bug.