correcting bugs in heartbeat after sign out/sign in