refactor public/private methods
ensure that all requests made on secure pages are https - fixes #9