Added session status function
Adapted to the new session status function in the session class