Corrected switch to SSL URI

To check if current page is SSL we need to do it on current page URI instance, instead on URI which we are building.
There is not need to store host and port in static variable as now current URI instance is being got always.