fixing bug on logout and with signature