Enabling auto login fixed this for me too (well at least so far....). Agree with others that this is only a workaround and not a fix.
My history of this problem:
About a month ago upgraded an MB Pro 15" Mid-2010 (which my wife uses) to El Capitan. Prior to that on Yosemite everything had been working fine with an external Dell U2415 monitor, connected via the Dell provided mini-DP to DP cable (Amphenol cable). I don't recall the exact sequence of events, but the problem of the display not being detected started shortly after that. After messing with it for a long time, eventually purchased another mini-DP to DP cable. Which worked at first, and I thought the problem was corrected, but then came back again shortly afterwards. Seems to be related to the computer going into and out of sleep. The display is not detected when coming out of sleep, nor after that if the cable is removed and reinserted again. Messed with it again for a long time, did the SMC and PRAM resets, re-booting, power cycling the monitor etc., nothing worked.
Then tried a mini-DP to HDMI adaptor cable, and an HDMI cable into the Dell monitor. Started working again. This time we decided to not forcibly put the computer into sleep (i.e. no Apple menu -> Sleep). Worked fine for several weeks, then had to restart the computer yesterday, and the problem came back.
Finally found this thread and tried enabling auto login and now working again, with the mini-DP to HDMI adaptor. Daren't try forcibly putting the computer to sleep, or even try going back to the original mini-DP to DP cable.
The funny thing is that with my main computer, an MB Pro 15" Retina Late 2013, with the exact same model of Dell monitor, U2415, and exact same cables, I have had no problems at all. I also used this computer to verify the other monitor and cables were working when they wouldn't work with the Mid-2010 machine.
And there is a long thread on what sounds like a very similar, if not the same problem, on Yosemite:
Yosemite does not recognize external displays...
But I didn't have problems on Yosemite.
Anyway, the fact that just changing to auto login fixes the problem would appear to point to this clearly being an OS X software problem.