Fix layout
Added checking for the presence of SSL certificate