Added dialog possibility.
Handled the case where a script is not loaded.
replace every alert with custom interface dialog.
Added impossibility of sending message if not logged in.