Now i\'m trying to make like a instagram chat program using firebase the problem is i want to show that member login status but android life cycle is problem
Here
The problems look like your ChatsActivity is destroyed while Glide is trying to load the image. You can use getApplicationContext() to get the current Context.
Try to replace,
Glide.with(ChatsActivity.this).load(user.getImageurl()).into(image_profile);
with
Glide.with(getApplicationContext()).load(user.getImageurl()).into(image_profile);
Also, you should use .onDisconnect() method given by firebase to check the presence of the user
When you establish an onDisconnect() operation, the operation lives on the Firebase Realtime Database server. The server checks security to make sure the user can perform the write event requested, and informs the your app if it is invalid. The server then monitors the connection. If at any point the connection times out, or is actively closed by the Realtime Database client, the server checks security a second time (to make sure the operation is still valid) and then invokes the event.
You can find out more from this doc