As one of the posters mentioned, this thread defines several scenarios which cause the "Crash back to Login" bug. My situation is comparable to several posts here that mention minimizing or reducing the size of a window. I have a mid-2012 MBP running 10.10.3. I also have an external monitor (via Kensington dock).
In my case, the problem started immediately after upgrading from Mavericks to Yosemite. It was first noticed when I was running PowerPoint (Office for MAC 2011) and I minimized the PPT window while working on a presentation. I noticed that the MBP froze and then it went dark, eventually back at login screen (and external disks remounting).
Over time, I realized that I could make it happen EVERY TIME. I would just minimize the PPT window and crash behavior and back to login screen.
I wrote this off to some problem with PPT, and just lived with it.
TODAY, after upgrading to iTunes 12.2, I went to minimize the iTunes window and it happened again. For me, this was the very first time it ever happened outside of the PPT scenario above. So, I googled and found this thread.
Once I read how to find the system log files on the crash report, I did identify for my situation it was a crash of WindowServer (which makes perfect sense due to the behavior).
If any Apple Support person is reading this, because I have the unique ability to make this happen on demand, every time, perhaps I can send you some log files and be of assistance.
I do reiterate that this thread seems to reveal likely numerous scenarios where the end result is the same - "crash and back to login" - but likely there are MANY MANY different issues at play.
CP