Added session loading

You can now load a session from a previous connection.
A function is here to check that the session is still valid.