Unregister client on tab close or reload
Unregister client on tab close or reload

Also improve the behavior on prompting if user wants to leave, to only
happen when logged in.

Fixes #139

RestComm/olympus,Mobicents/olympus,RestComm/olympus,Mobicents/olympus,Mobicents/olympus,RestComm/olympus,RestComm/olympus