Polish session setup routine.

Move connect() from rat-con to rlist and rename to prepare_session().
Move session.connect() call from connec() function to the main() function.