Added logout links and updated session when logging out.