I too use a laptop with an nVidia graphics card.
First update to the "experimental" 310 drivers from the repositories. They seem to do a much better job at auto detecting when a monitor is plugged in.
Second, in nvidia-settings, disable the secondary monitor, enable the primary monitor (built in one) and the save to xorg and restart X
restart lightdm
This should make it so that you can use your internal monitor only.
Now, with everything running on your internal monitor, install disper
apt-get install disper
This handy tool allows you to set up a few things without having to rely on nvidia-settings which seems to really confuse unity, and without directly having to use xrandr which can be a bit of a pain when your randomly changing monitors all the time.
Last few steps:
Test that you can get your second monitor to play nice by plugging it in. It should "just work" in Ubuntu by going to "Displays" and setting it up the way you want it. It's very important that "Displays" see two monitors and not 1 large monitor.

With everything working in unity on two monitors in "Displays" run
disper -s
That should turn off the second display and leave only your internal monitor running.
Now, finally, to make that work at the greeter, open /etc/lightdm/lightdm.conf
add or change:
display-setup-script=disper -s
For reference my /etc/lightdm/lightdm.conf:
[SeatDefaults]
user-session=ubuntu
greeter-session=unity-greeter
xserver-command=/usr/local/bin/xswitcher.sh
display-setup-script=disper -s
Make sure not to copy the xserver-command, only use the display-setup-script line.
You should now be able to log in fine. The primary monitor will get the unity greeter, and once you log in unity should take over, and setup what ever you have configured in "Displays"
For me this means the greeter has the primary on, the secondary off, and then I log in and the primary is "right of" the secondary, with both displays on. I have gotten auto plug and unplug to work fine. The non-experimental drivers, or forcing twinview in nvidia-settings causes me much the same headache you describing.
`