Issue #4 ensure userid is set when user first logs in