macbook frozen at log-in screen
I have a 2012 MacBook Pro and am using Yosemite Version 10.10.04. Recently, within the past three weeks I've run into a recurring problem. What happens is I will close my laptop without turning it off - something I have done a thousand times before - and when I go to open it next it is frozen on the log-in screen, with my mouse always stuck in the same exact spot (above the log-in area, to the left) and the log-in screen being oddly see-through, including the text. I cannot type my password in and always have to force restart my computer. When I restart it, it works, but I always get a message saying "You restarted your computer because of a problem" and would I like to open the previous applications. Additionally, there are times when I am charging my laptop, and when I unplug it because it's fully charged (charging with the laptop closed), my computer will make a restarting noise before I've even opened it and I know then that I will open my computer to find it frozen on the log-in page.
Since I've owned my laptop, I usually don't close the laptop without closing all windows, though occasionally something like Word or Safari may still technically be on, though I usually make a point to never have safari or things connected to the internet running. Since this problem occurred however, I've tried quitting all applications before shutting my laptop, but the problem persists. Most recently, I closed out of all applications and quit them as well, but when I went through the whole ordeal of having to restart my computer again, my computer asked if I wanted to open any applications that were running previously, which does not make sense because I quit all applications, so there was nothing running to reopen.
I really have no idea why this would have just randomly started happening. I carry my laptop to school every day and admittedly don't turn it off when I do so, but I have also done this since I've owned my laptop as well. Also I haven't been able to back up my laptop for over a month due to travels, so I don't know if that would contribute in some weird way either.
MacBook Pro (15-inch Mid 2012)