logout when patient is set error fixed