Re: computer won't re-login
There is only 1 password on Ubuntu a user password, this is used even for root with sudo access.
You can create the root account and set a different password, so if youve done this make sure you enter user pasword and not root password.
You say "sometimes". Define sometimes. Does it work 4 times out of 5 or something else?
You can try pressing ctrl-alt-F1 to see if an alternate console is available, never disconnect power this can harm your hard drive, instead hold the power button for 5 to 10 seconds until it powers off.
Hope that helps.