Added callbacks in session.c