add logout functionality to libs and header