MacBook Pro keeps returning to login screen
I found this problem after not using my MacBook for a while. 
I removed the battery. Pressed the on button for 30 seconds with the battery removed and power chord unplugged. 
Put the battery back in. Restart, and mine was o.k