Added session security mechanism.
Other changes