Added functionality for saving logged user session.