This happens when your friend's account is still logged in somewhere on your device. Did he log in via Facebook or via Apple ID? If he used Facebook, check whether he isn't logged in in Safari. You can remove an unwanted Apple ID from the iTunes & App Store settings.