Added session handling, except the destroy session method.