Fix the logout link in the base template (bug #1128381)

The order matters for the reverse() functionality to work.