changes for authentication and temp_user_id