Fix the handling of userflags during login