BUG FIX: close profile modal when the application is disconnected with the server