Added logout to templates