session: fixed localhost connection problem