SSL (HTTPS) support for proper security

See commit messages for details.