Add secure communication between gui and server 2/2

This pull request syncs up the ssl and auth support with changes made for the gui.