Added logout function and link to it in the base template