Change contracts to allow user_id with type long().

Also, add testing for long user_id.