Fixed the login link and template management