Fixed offlinetest and some other things

device_id is currently on hold, may need to get context when creating a
user.