Getting the session to work