The following command will run the script, and then keep running the script after you log out.
nohup ./somescript.sh &
Miracle? No. Nohup just ignores the kill signal, preventing the script from getting the signal. Thus, the script won't exit when you log out.
The interesting thing about the command is that it gives you an idea of how easy it is to write nonterminating programs. You have to do work (or let the library do work) to automatically exit the program when the user exists.