Moving the certificate buttons around conditionally.

That should fix redmine #4360