Tap in the action bar to open the slide-out navigation, and tap Settings.
Under Background Data:
Tap Automatic Logout to set a time after which you are automatically logged out.
Select the amount of time your session should be inactive before you are automatically logged out.