Fixed logout for maintemplate.html

You can now logout with the options (gear) button in the header.