The second thing you describe, where you seemed to wake up but were still dreaming, is called a false awakening. If you remember to always do reality checks right after waking up, false awakenings can frequently become lucid dreams.