modify. write user_id in session