Logging out on ipad and android

I have put the app on my ipad and my android phone. Do I have to manually log out of them or can I set it to log out when I exit the app (i.e. go into another app)? I was surprised when I closed the ipad for over an hour the app with all my details was still open when I opened the ipad!