You can get logged out of Spotify due to viruses and bugs on your device, incorrect login details, an old version of the Spotify app, accessing Spotify accounts from different locations, etc.